ActiveX -- Saving Excel File

2 次查看(过去 30 天)
Jonathan Roy
Jonathan Roy 2015-7-8
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 个)

类别

Help CenterFile Exchange 中查找有关 Use COM Objects in MATLAB 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by