I am creating CSV file, when i set some value like...
# suitescript
d
I am creating CSV file, when i set some value like "0000165800" using the script, CSV eliminates the leading zero's and prints 165800?
a
did you try to open that csv file using Notepad? I believe it's issue of Excel, which eliminates zeros if the field type isn't text.
d
@Arūnas Žindžius i am using papaparse to generate csv file
e
I'm not familiar with papaparse, but it looks like the column is being parsed as a
number
instead of a
string
Can you tell papaparse how each column should be read?
d
@erictgrubaugh i din find any option, excel was autoformatting the data
tried quoting the value before creating CSV file it worked
a
to avoid excel action of zeros removal you have to import that file in Excel spreadsheet instead of direct open in Excel. During import you can control what datatype to use for each column.
👍 1