not able to use "actxserver" command in linux

8 Ansichten (letzte 30 Tage)
Nitin
Nitin am 28 Jul. 2023
Bearbeitet: dpb am 30 Jul. 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

Antworten (1)

dpb
dpb am 28 Jul. 2023
Bearbeitet: dpb am 30 Jul. 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...

Kategorien

Mehr zu Use COM Objects in MATLAB finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by