ActiveX -- Saving Excel File
2 views (last 30 days)
Show older comments
Hi!
I have an excell sheet who auto refresh data from web when I open it. I want to open the file, save it and close.
I can open, and close but not able to save it...
this is my code
% Create object.
ExcelApp = actxserver('Excel.Application');
ExcelApp.Visible = 0;
% Open file located in the current folder.
ExcelApp.Workbooks.Open(fullfile(pwd,'\Niveaux.xlsx'));
% Make the first sheet active.
eSheets = ExcelApp.ActiveWorkbook.Sheets;
eSheet1 = eSheets.get('Item', 1);
eSheet1.Activate;
ExcelApp.Saved=1;
ExcelApp.Quit;
ExcelApp.release;
I try many things but dont find a good solution... Thank guys for your help
Matlab R2013a,
0 Comments
Answers (0)
See Also
Categories
Find more on Use COM Objects in MATLAB 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!