How to Plot data in excel sheet using MATLAB ?
78 次查看(过去 30 天)
显示 更早的评论
OUTPUT I WANT
I want this chart using matlab...!!
xlswritefig function not allowed ..!!
3 个评论
Rik
2021-11-16
Flags are used to attract the attention of site administrators. Please use comments to clarify what you mean and how that differs from the suggested solution.
采纳的回答
Walter Roberson
2021-11-16
To create the bar chart inside the excel file, you will need to use the ActiveX interface to talk to Excel on MS Windows (will not work on Mac or Linux)
There are two approaches.
One approach is to create a graph at the MATLAB level, and convert the graph to an image, and insert that image into the excel file. See https://www.mathworks.com/help/matlab/matlab_external/example-reading-excel-spreadsheet-data.html#bqfirb9 for an example.
The other approach is to use the ActiveX interface to send VBA plotting commands to Excel. See an example at https://www.mathworks.com/matlabcentral/answers/463285-plots-in-excel-sheets-using-matlab#answer_376014
更多回答(1 个)
KSSV
2021-11-15
Your excel file has no much data. You can read the data from excel file into workspace using readtable.
T = readtable('test.xlsx') ;
You can use the table to plot what you want.,
8 个评论
Rik
2021-11-16
So you want to use Matlab to create a bar chart in your excel file? Why not do that in excel directly?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spreadsheets 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!