3 ms·
The way around it is, rather than opening the CSV file directly, to create a new blank workbook and import the CSV file using Data --> Get External Data --> Fro
by geographomics 11y ago
The way around it is, rather than opening the CSV file directly, to create a new blank workbook and import the CSV file using Data --> Get External Data --> From Text. This opens the Text Import Wizard and from there one can define the datatype for each column - set it to Text (instead of the default, General) and it won't be interpreted as a number.
Another way is to rename the .csv file to be .txt instead, and load it in normally. This triggers the Text Import Wizard upon opening, and the rest is as above.
Also to do this programmatically, one can use the VBA function Workbook.OpenText, and specify the data types via the FieldInfo parameter.