1

hope you guys can help!

I am trying to create .csv out of Excel which would have columns A - H filled with some data I want to read but data is optional. So some times the first column A can be empty. Now, when I save the .csv, unless I entered one space in the A column, Excel automatically trims A column, and the result is 7 cells to read A - G instead 8 cells A - H (with A column) being "empty". I would like to save client the trouble of needing to enter one space or -> ="" in the Excel formula to make first or last column "empty" but not trimmed in the resulting .csv.

Thank you!

1 Answer 1

2

There is no option in Excel to preserve empty columns, when exporting to .csv. But you could introduce a header text in the first row, so you will always have the columns filled atleast with the header text.

Plus it would make your data probably more readable, depending on what data this is.

Another possibility would be to implement a makro and embedd a button in your excel file:

see how not to skip empty first cell when saving as .CSV?

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you for this quick fix. Haven't occurred to me to use header row.. I did just that, added header row with descriptions for each column, and than in second row added the data and made the fist and the last column empty, which resulted in the A and H column being empty string rather than fully blank cell. Cudos to you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.