Writecell/table to Excel error
58 ビュー (過去 30 日間)
古いコメントを表示
Hi all,
I can no longer export data to Excel using writecell/table, because the function crashes due to an import issue :
Error using writetable (line 278)
Error: File: createWorkbook.m Line: 80 Column: 12
Unable to find or import 'matlab.io.spreadsheet.internal.BookType'.Imported names must end with '.*' or be fully qualified.
No problem in Matlab R2023, as it does not seem to use the same sub-functions.
Regards,
Stéphane.
0 件のコメント
採用された回答
その他の回答 (2 件)
dpb
約18時間 前
移動済み: dpb
約15時間 前
Which OS and show a sample code that fails...
tX=array2table(randn(4,3),'VariableNames',cellstr(('A':'C').'))
writetable(tX,'test.xlsx')
dir
clear tX
readtable('test.xlsx')
It functions here, of course Excel isn't available on this platform so doesn't quite match what would happen on on Windows system with Office installed.
The specific syntax complained about by the error message exists in all prior versions so something's amiss in that.
7 件のコメント
Walter Roberson
約4時間 前
編集済み: Walter Roberson
約4時間 前
No, I have /Applications/MATLAB_R2025b.app/toolbox/shared/spreadsheet/+matlab/+io/+spreadsheet/+internal but that has
Book.m getSheetNames.m
columnLetter.m readSpreadsheetFile.m
columnNumber.m selectOAuthTypeId.m
createDatetime.m Sheet.m
createGoogleSpreadsheet.m SheetType.m
createWorkbook.m SheetTypeFactory.m
dateFormats.m stringize.m
getExtension.m usedDataRange.m
getRemoteSpreadsheet.m
with no BookType.
Furthermore, when I grep through all of the binary libraries and all of the .xml and all of the source code, then only BookType is a mangled C++ symbol for _spreadsheet_mli::get_book(spreadsheet_mli::MCOSBookType*) -- so I cannot even find any reference to BookType anywhere.
Fangjun Jiang
約1時間 前
You might have a different writetable.m
>> which -all writetable.m
C:\Program Files\MATLAB\R2025b\toolbox\matlab\io\tabular\iofun\writetable.m
C:\Program Files\MATLAB\R2025b\toolbox\matlab\bigdata\@tall\writetable.m % tall method
C:\Program Files\MATLAB\R2025b\toolbox\parallel\array\distributed\@codistributed\writetable.m % codistributed method
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!