Trying to generate a plot from an Excel file.
Info
This question is closed. Reopen it to edit or answer.
Show older comments
Hello all! I am trying to take some imported data from an excel file (.xls) in order to generate a plot of it where the x-axis is the A column and the y-axis is B-column.
Here is the code:
filename = 'PlotCycles.xls';
sheet = 1;
xlRange = 'A1:A1430';
ylRange = 'B1:B1430';
x = xlsread(filename, sheet, xlRange);
y = xlsread(filename, sheet, ylRange);
Plot(x,y)
I am getting an error that says "Warning: Could not start Excel server for import, 'basic' mode will be used. Refer to HELP XLSREAD for". This is fine I think because I only want a numerical array anyways. The next error I get is:
"In xlsread at 187
In PlotCycles at 5
Warning: Range cannot be used in 'basic' mode. The entire sheet will be loaded.
In xlsread at 200
In PlotCycles at 5
Error using xlsread (line 247)
File contains unexpected record length. Try saving as Excel 98.
Error in PlotCycles (line 5) x = xlsread(filename, sheet, xlRange);"
I'm really not sure what to do in this situation, I'd appreciate any input thanks!
Answers (0)
This question is closed.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!