Problems with lines using Save() function during Excel processing in Matlab
古いコメントを表示
Invoke Error, Dispatch Exception:
Source: Microsoft Excel
Description: Save method of Workbook class failed
Help File: xlmain11.chm
Help Context ID: 0
---------------------------------------------------
excelApp = actxserver('Excel.Application');
excelApp.DisplayAlerts = false;
excelApp.Visible = false;
workbook = excelApp.Workbooks.Open(fullfileName);
sheet = workbook.Sheets.Item(sheetNum);
shapes = sheet.Shapes;
shape = shapes.AddOLEObject([], pdfPath, 0,1,[],[],[],left,top,1,1);
workbook.Save; % error occurred this line
workbook.Close(false);
excelApp.Quit;
delete(excelApp);
What's the problem?
I would appreciate it if you could let me know the number of all possible cases.
First of all, I don't think I took the wrong route..
I experimented with 4 to 5 PCs with the same code
On some PCs, the code runs well,
Another PC spits out such an error, so I wonder if this is an environmental problem.
1 件のコメント
Mario Malic
2024 年 3 月 5 日
Also, try to save a file providing a full path to the directory with read/write access and see if the Save/SaveAs method works properly.
回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Data Import from MATLAB についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!