Why does xlswrite not replace file when I tell it to?
Show older comments
I have a script that uses xlswrite to export some output. I use uiputfile to prompt my user for the filename and path for this output. If a user chooses an existing file, they are ask if they want to replace the existing file.
One of my users noticed that even through he selects "replace existing file", the file is not replaced. Instead the new output is written over what was already in the file. Which creates a big old mess.
I told him the simple fix is to just delete the file ahead of time and recreate it when the script prompts him. Or just use unique filenames. He wasn't impressed with this fix and wants me to make Matlab do it for him. (My boss, so have to).
Anyone know how to do this?
Accepted Answer
More Answers (1)
TastyPastry
on 2 Nov 2015
0 votes
You could fill the file with empty cells, or there's a solution here. Scroll down to the solution by ImageAnalyst.
Categories
Find more on Standard File Formats 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!