Write range is changing colum data type

excel
activities

#1

Hi
When I’m saving a data table to an excel file the original DataType of some columns is changed.
The data table was obtained after a web scraping and looks like below:

000002272266,FRANN,27/04/2017,1,“16.100,00”,USD,“1,08780”,“14.800,51”,EUR,SHB069,
000002272261,SCH,27/04/2017,3,“2.175.109,00”,JPY,“120,98000”,“17.979,08”,EUR,SHB069,
000002272262,JPMOD,27/04/2017,2,“25.304,26”,USD,“1,08780”,“23.261,87”,EUR,SHB069,
000002272264,BLGFE,27/04/2017,1,“13.233,63”,USD,“1,08780”,“12.165,50”,EUR,SHB069,
000002272267,PICTE,27/04/2017,3,“190.660,94”,USD,“1,08780”,“175.272,05”,EUR,SHB069,
000002272263,SCH,27/04/2017,1,“10.890,03”,USD,“1,08780”,“10.011,06”,EUR,SHB069,
000002272268,FIDFA,27/04/2017,2,“45.907,44”,USD,“1,08780”,“42.202,10”,EUR,SHB069,
000002272265,FRANK,27/04/2017,3,“15.686,25”,USD,“1,08780”,“14.420,16”,EUR,SHB069,
000002273352,GSFIN,25/04/2017,2,“2.438,00”,USD,“1,09100”,“2.234,65”,EUR,SHB069,

After saving in Excel using Write Range giving the data table in input I found this

What should I have to do for keeping the leading zeroes in the first column and to avoid the conversion to Double in the seventh one?
As you can see the two columns in green was saved as text as I need.
Can someone help me with this issue?
Thanks a lot.


Reading CSV and Writing to Excel changes datatype
#2

Hi Mugur, what would help is to create a “For each row” loop where you will add an apostrophe (’) before each value which you want to retain as text and then use Write Range activity


#3

Thanks Jan
It works fine
Regards


#4

hi @Mugur hi @jan…can you share me how this works. Im having same kind of problem.

thanks


#5

Hi Delf
You have to concatenate an apostrophe character with the value that you want to write in the Excel cell.
In the write cell activity write this “’” +
This will transform your value in a string.
Regards


#6

hi @Mugur thanks for the reply…can you provide me some example about this… im still confused with this one…

thanks


#7

Excel.xaml (11.3 KB)
Sorry for the delay. I’ve attached an example flow as requested
Regards


#8

Thanks @Mugur
It really helps

Cheers