You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
xlsfile fails in Matlab 2022a with the following error:
Error using cbd.xlsfile
Error:File: xlsfile.m Line: 92 Column: 51
Identifier 'workbook' is not a function or a shared variable. To share 'workbook' with a nested function,
initialize it in the current scope. For more information, see Sharing Variables Between Parent and Nested
Functions.
I'm not sure what the long-term fix is since the COM interface seems to have changed somewhat, but a temporary solution appears to be to replace lines 78-101 of xlsfile with the following:
if ~newWb
obj.xlApp.DisplayAlerts = 0;
obj.xlApp.workbooks.Open(obj.file, 0, readOnly);
obj.wkBook = obj.xlApp.ActiveWorkbook;
end
wbProps = get(obj.wkBook);
if wbProps.ReadOnly && ~readOnly
warning('xlsfile:readOnly', 'Excel file opened read only.');
end
I'll try to circle back on this soon, but this should let you at least use xlsfile in the meantime.
The text was updated successfully, but these errors were encountered:
xlsfile
fails in Matlab 2022a with the following error:I'm not sure what the long-term fix is since the COM interface seems to have changed somewhat, but a temporary solution appears to be to replace lines 78-101 of
xlsfile
with the following:I'll try to circle back on this soon, but this should let you at least use
xlsfile
in the meantime.The text was updated successfully, but these errors were encountered: