-
Notifications
You must be signed in to change notification settings - Fork 9
Save Excel Sheet As CSV
Greg Kostin edited this page Oct 20, 2017
·
2 revisions
Excel Save As CSV
- Open the Excel workbook in Excel
- Make the sheet you want to save in CSV format the active worksheet
- Under the File menu select Save As...
- For File Format: select CSV UTF-8 (Comma delimited) (.csv)
- Save the file (Select Active Sheet)
- Open the CSV file in VIM
- Enter the VIM command :%s/\r/\r/g which will wake up VIM to do its' magic on ^M at the end of lines
- Navigate your cursor to the first empty (all commas) line and enter d G to delete everything from there to the end of file
- Enter the VIM command :set nobomb to have VIM remove the hidden <0xEF,0xBB,0xBF> at the start of the file
- Enter the VIM command :wq to save the file and quit
Hex Verification
- Open the CSV file in VIM
- Enter the VIM command :%!xxd to enter hexadecimal mode
- Search for the hidden <0xEF,0xBB,0xBF> via /efbb bf
- Enter the VIM command :%!xxd -r to exit hexadecimal mode