I have to export my data from LabVIEW to xlsx file, I'm doing it using "Write measurement to file" block set to xlsx file and overwrite when file exists.
Unfortunately time to time we're facing some hardware issues so I've been asked to save the measurement one each hour so we can recover some data in case of crash. I've simply putted a write measurement to file block into loop for the end of program.
Unfortunately each write appends file instead of overwriting it, so I have to delete it manually before the write...
Yup I also suggest the report generation toolkit. It is free with several versions of LabVIEW (pro and maybe full?) and you can code it to do whatever you want. The express VI Write to Measurement File is really only useful in small cases, and anything beyond that should be done with custom code.
great, but please mind that I'm reporting a bug....
It Write measurement to file is so bad why are NI keeping it?
Its not a bug, sounds like a decent feature request. Write Measurement isn't bad, and it isn't broken, it just doesn't meet your needs. If I need to multiply two numbers, the add function isn't broken, it just isn't the right thing to use. If you need a simple logging feature the Write Measurements may work just fine. But as soon as you need a feature that it doesn't have, you'll want to look into writing code to do the logging yourself.
It's an obvious bug! In Form "If the file already exists" the option "append to file" appends the file, and the option "overwrite the file" also appends it instead of overwriting it!
Without any context in your last message I was confused. If it really does not overwrite the file then yes that would be a bug and a temporary solution until it is fixed, would be to delete the file before calling Write to measurement so it can't be appended.