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?
Best Answer