ActiveX -- Saving Excel File

2 vues (au cours des 30 derniers jours)
Jonathan Roy
Jonathan Roy le 8 Juil 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,

Réponses (0)

Catégories

En savoir plus sur Use COM Objects in MATLAB dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by