How deal with commas in a CSV file when trying to put excel functions in cell value

StackOverflow https://stackoverflow.com/questions/23612608

  •  20-07-2023
  •  | 
  •  

質問

I'm trying to put a value inside a csv cell, which is actually an excel function. It could have worked, except for the fact the commas are delimiters in csv files. When I try for instance to put the following, the csv is creating more columns instead of just put the function in the cell:

DATE(2014, 03, 15)

It doesn't work because of the the commas. Any solution anyone?

役に立ちましたか?

解決

As stated in the comments, try adding double quotes around your data like so:

"=Date(2014, 03, 15)"

You may also want to look into a 3rd party library like Epplus. If you're dealing with a lot of formulas it will make your life much easier than trying to format your data as a csv file. Check it out here.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top