I recently upgraded from Windows 7 to 10 and from Office 2007 to 2019. Today, I imported a CSV file into Excel:
Data > From Text/CSV > Load
The wizard indicated the "File Origin" as "1200: Unicode" and the delimiter as comma. The file does have comma delimiters with double quotes around text.
There was an immediate visual difference from Excel 2007 -- The imported data had table formatting added to it automatically. It was pretty, but I didn't want it, and I found out how to get rid of it by going to "Table Design", unchecking "Header Row" and "Banded Rows" and clicking "Convert to Range" (upon which "Table Design" disappeared from the main menu), and then deleting row 1, which had been added for the unwanted header row. If someone can say how to import the data without the table formatting being added, I'd like to know that, although there's a more important problem.
As in Excel 2007, a connection was set to the CSV file. I don't need that, so I deleted it, as I always have done in Excel 2007.
Now here's the big problem. The entire rectangular range of cells bounded by the number of rows and columns imported is now treated as if every cell has data in it, including those that are empty. This is the case even for rows in which the CSV file has only one data element (i.e., no commas outside of double quotes), so only column A should have data for those rows. When I say that the empty cells are treated as if they have data, what I mean is:
<cell>
) = 0 (meaning that the cell is empty)<cell>
) = 1 (meaning that Excel thinks it is not empty)<cell>
) = 1 (meaning that Excel schizophrenically also thinks it is empty)Edit: Through further testing, I've determined that what is happening is that Excel is incorrectly treating null cells in the import as if they are empty strings.
Is there something I need to do differently when importing the CSV file in Excel 2019 in order to have the empty cells treated correctly?
""
(Value = ""
), whereas when imported using the legacy wizard, the cell remains, indeed, Empty
.SpecialCells(xlCellTypeBlanks)
executed over the table range will not find any cells.3 workarounds
File > Options > Data
and select the legacy wizards you want. They will then show up as an option on the Data > Get & Transform Data > Get Data
dropdown.Transform Data