How do I write null for blank fields when I export a csv file from Excel 2007? Is there a feature to do that.
feedback
|
|
While exporting, i think it may not be possible. But you can also try this way before saving or after saving
OR With macro, VB code:
| |||
feedback
|
|
Short answer: You don't do anything. There is no difference between an Excel cell with an empty string or one with no value (null) for purposes of exporting a CSV. The fields in CSV files don't actually have data types. So you will get an empty field in your CSV file either way. Example:
Will generate a CSV that contains:
Nothing between the two delimiters (commas) means empty or null. How the empty value is dealt with depends on the software that is reading the CSV file. | |||||
feedback
|
|
Open the CSV file in a text editor, such as Notepad, and do a find/replace all | |||
|
feedback
|
|
I don't know Excel but this python script will do it
| |||||
feedback
|
