I just got a CSV input file to be processed, which has an equal-sign before the first delimiting quote, and wondered if this is valid and has any purpose. Example (simplified):
"2"
"3"
="4"
After reading some postings like this one I experimented with a CSV like this:
"2"
"3"
="A1+A2"
and:
"2"
"3"
"=A1+A2"
It seems that both Excel and LibreOffice silently ignore the equal-sign before the quote, and nicely treat the equal-sign after the quote as the flag for a formula. However, I could not find any documentation about this.
(For Excel, this CSV needs to be saved with the .txt extension, and opened with control-O)
I am inclined to call the CSV with equal-sign before the open quote as an error that is easy to deal with when reading this file, but still wondering if there is more to say about this.
="A1+A2"
then the cell will displayA1+A2
as text while the formula (in the Formula Bar) remains="A1+A2"
. If you get too adventurous with attempting to bring in formulas as a CSV field, you may run into#NAME!
errors. That's not to say that formulas cannot be brought in but I've found that occasionally you need a Find & Replace for = to = to 'assert' the formula as a true formulas and not text-that-looks-like-a-formula.