not able to use "actxserver" command in linux

8 vues (au cours des 30 derniers jours)
Nitin
Nitin le 28 Juil 2023
Modifié(e) : dpb le 30 Juil 2023
Hello All,
Using m-script, I am accessing excel files. e.g. opening the excel file, renaming sheets, adding data to excel sheets.
These m-scripting commands works well in windows operating system. I am able to open, edit, rename sheets in excel.
But I am not able to do so on linux operating system. (Finally I want my m-script to run on Linux system)
After a bit of search I found that "actxserver" supports only on windows operating system.
So please let me know is there any alternative for "actxserver" on Linux operating system.
Please find the commands that I am running:
% # open Activex server
e = actxserver('Excel.Application');
% # open file (enter full path!)
ewb = e.Workbooks.Open(strcat(filename_testvector.folder, filesep, filename_testvector.name));
ewb.Worksheets.Item(1).Name = sheetname_testvector; % # rename 1st sheet
e.Visible = 1;
ewb.SaveAs(strcat(testpathName,filesep, newfilename_testvector));
ewb.Close(false)
e.Quit
e.delete

Réponses (1)

dpb
dpb le 28 Juil 2023
Modifié(e) : dpb le 30 Juil 2023
No.
Even if the target machine has Excel installed and running under Wine, there's no port of the COM communications infrastructure to support it. MS simply has no interest in supporting the competing OS and the level of effort to reproduce it in the open software community is simply too large and too much proprietary stuff to hack around it'll never happen.
Whether there's any way to do such things with Open Office or the like I don't know; probably not...

Catégories

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

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by