not able to use "actxserver" command in linux

8 ビュー (過去 30 日間)
Nitin
Nitin 2023 年 7 月 28 日
編集済み: dpb 2023 年 7 月 30 日
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

回答 (1 件)

dpb
dpb 2023 年 7 月 28 日
編集済み: dpb 2023 年 7 月 30 日
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...

カテゴリ

Help Center および File ExchangeUse COM Objects in MATLAB についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by