I have a macro that creates a report in a new unsaved workbook.
- I want the workbook to be saved as XLSX format - and remain open after saving.
- While saving the XLSX, I also want a copy of this workbook to be saved in CSV format (without any warnings about possible data loss or incompatibility with CSV format)(I accept the risk for this particular report)
- After the macro has finished running, I should end up with a CSV and a XLSX saved in the same location (Documents path) and only the XLSX file should be open.
- The macro should run with no prompts (the location and filenames will be preset by the macro)
I think I can handle writing all of this except for the CSV aspect. Help would be appreciated.
(I want two formats because XLSX is more readable - with tables and filters - but I need a copy in CSV for importing to other programs)
UPDATE:
My post wasn't as clear as I thought it was. Clarifying the above requirements:
- The macro exists outside of the workbook that is generated. "I have a macro that creates a report in a new unsaved workbook".
- The XLSX needs to retain all of its formatting. The CSV will have to be created from a copy of the open workbook. "XLSX is more readable - with tables and filters - but I need a copy in CSV for importing" & "(without any warnings about possible data loss or incompatibility with CSV format)(I accept the risk for this particular report)"
Bookmarks