ActiveX -- Saving Excel File

2 visualizaciones (últimos 30 días)
Jonathan Roy
Jonathan Roy el 8 de Jul. de 2015
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,

Respuestas (0)

Categorías

Más información sobre Use COM Objects in MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by