Is there a way to return the status of writetable, writematrix, or writecell?
Show older comments
I've been assigned to maintain some old code from 2014, and the old code uses xlswrite, which is according to MATLAB, outdated, and that makes sense why it's not working. I saw the alternatives to xlswrite are writetable, writematrix, or write cell, but I noticed that it doesn't seem any of those functions support returning the status of the write automatically (1 for successful, 0 otherwise) like xlswrite did.
This is important because the rest of the code depends on this status being true. I know I could just change xlswrite to writetable, then have a separate line where I set status = true, but then it's not actually writing the status and it's not guaranteed that the write was successful. I've seen some other MATLAB support forums that show that writetable is not always successful.
This code is to be compiled into a GUI with neat, clean errors shown to the user so I can't just let the errors from writetable pop up to the end user unexpectedly.
Is there really no alternative to xlswrite that has a built-in status output?
Accepted Answer
More Answers (0)
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!