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