not to kibbitz your excellent inventory/export routine, but I'd just use Open/writeline/close into a CSV. In this case, since all the data is already in an array, I'd just use WriteFile() to dump the array to a file. There would only be issues if any of the fields had commas... (may want to a joinsplit on each element and replace with a period)

It would work out about the same... as excel would still open it. And the code (and output) would be much lighter

and to nitpick... I'd call the function ExportToXLS()...
_________________________
How to ask questions the smart way <-----------> Before you ask