Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Excel exporting hundreds of empty columns on CSV export

Before I begin, I'm using Excel for Mac 2011. I'm having a problem with a particular Excel spreadsheet. When I export any of the active worksheets to CSV (windows CSV format), it exports ~200 blank columns along with the 7 or 8 populated columns. I've had a similar issue in the past, and found a site that said the way to fix it was to find all blank characters, and replace them with a space. This worked in the past, and any blank columns were not export anymore. This doesn't seem to be the case with this particular workbook.

Does anyone know how to resolve this? Is there a particular macro that I can use to get rid of these blank columns, or perhaps an Apple Script? Any help would be greatly appreciated.

like image 757
Siraris Avatar asked Feb 20 '14 01:02

Siraris


1 Answers

I can remember this problem with older Excel, even on Windows.

The problem is that Excel thinks these columns are part of the workbook. I am sure there was a way to select just what you wanted and tell Excel the bounds, but I cannot remember.

If you go into page mode you can see what Excel thinks is your data. I think you can fix it here.

The easy solution is to select the column to the right of your data, extend the selection to the right and delete the columns.

like image 172
Milliways Avatar answered Oct 21 '22 09:10

Milliways