I am having values in Data table but after writing the values in the csv or excel he values are getting rounding off even tried to change the column formats in the excel as text and number not working
After writing into csv or excel file the values are getting round off
8255110500129560 abc@test.org
8255707087262160 test1@avc.com
8255909010804410 test2@gmail.com
Yes, facing issue after writing the data into excel
I have added ’ for each account number in data table before writing into excel('8255110500129566) in that time its working as expected but i don’t want to ’ to display in csv file
Is there any way to avoid this issue , tried all possible ways
Sorry but what is your input and expected output? Is your input Excel? If so, please can you try to set cell format as text? Or can you share your input?
In the CSV file, data is correctly stored like 8255110500129566, right?
What is your current problem?
To write date from the csv to excel? If so, can you try WriteRangeWorkbook or WriteCellWorkbook OR use FormatCell activity in advance as the following?
But after writing same database input into csv file , in the csv file the data is displaying like this , which is not correct(write csv)
After writing into csv or excel file the values are getting round off 8255110500129560abc@test.org
8255707087262160 test1@avc.com
8255909010804410 test2@gmail.com
To isolate cause, can you try to set Breakpoint at the WriteCSV and run debug mode?
Workflow will stop there, then check content of datatable at Locals panel if correct value or not.
I am not sure what is the issue, when i try to open the output file with note pad , the values are showing correctly but while trying to open with excel not showing correctly
From the image, the data is correctly stored in the CSV
As i mentioned, it’s excel reading matter. It’s necessary to handle data as text in the sheet.
For now, can you try to open the csv file via FIle-Open menu?
Then Text Import Wizard will be launch, and set comma as demiliter and Text as dataformat?
can you please check the datatype of the “account_id” column when it was first created in datatable(at source)?
i think it is integer/decimal type column because of which when it writes back to excel it causes default rounding off of data
Possible solutions:
1.Change the column type into a string type column when you are first defining the datatable, and while doing add datarow use .tostring while entering “account_id” column’s value
2.If the source datatable is coming from a different source and you dont have control of using build datatable, then add a new datacolumn say “str_account_id” of string type, and use for each row to populate the value of this column