Error using xlswrite1
3 views (last 30 days)
Show older comments
When using xlswrite1, I havae been having some issues with it correctly writing data to the spread sheet; it doesnt upload at all. When uploading this:
%comment
Excel = actxserver ('Excel.Application');
File='C:\YourFileFolder\FileName';
if ~exist(File,'file')
ExcelWorkbook = Excel.workbooks.Add;
ExcelWorkbook.SaveAs(File,1);
ExcelWorkbook.Close(false);
end
invoke(Excel.Workbooks,'Open',File);
I get this: Error using Interface.Microsoft_Excel_11.0_Object_Library._Workbook/SaveAs.
I cannot use xlswrite due to the amount of things I have, but xlswrite1 isnt working. How can I fix xlswrite1 so it not only doesnt give me this error, but it allows for the data to be transferred to the excel document. This is adding onto my last question which can be viewed here: http://www.mathworks.com/matlabcentral/answers/266354-how-can-i-use-xlswrite-in-a-nested-forloop-without-overwriting
2 Comments
Walter Roberson
on 3 Feb 2016
Is an extension included in the file name? Is the destination writable?
Answers (0)
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!