Write CSV problem (numbers in general format with +12)

Hi folks,

I’ve made a process which write range inside a .CSV like this:

And I need to keep values without this “+12” or “+13”. Just the whole number, like this:
image

Any idea about how to do it?

Cheers,
Pablo

Hey!

If the column is in General format, the number will be displayed like 1.2345E+11,
change the column format to Number and it will be displayed like 1234000000000.

Keep the CSV file you are pasting as a template file with this formatting changes and make the bot to past it in to the template file.

Hope this works.

Regards,
Rajeswari

1 Like

Hey!

Use preserve format in write range…

Regards,
NaNi

1 Like

Hi,

In the CSV activities there isn’t the property: “preserve format range”

thank you

Hi there :slight_smile:

I tried to save a template with the right format in the columns I need, but when I open it again, it has all the columns as “General” format again :confused: . I think this shouldn’t work.

Thank you anyway,
cheers

Can you upload the csv file here to check.

1 Like

only clean way I can think of right now is below, before writing to csv file

For each row in dtInput.Rows
	row("NumberColumn") = "=""" & row("NumberColumn").ToString & """"
next row

Excel can not store the formatting info of csv file (as name suggest Comma Separated Values). CSV file is just simple text file compared to xlsx file which zip file containing all the required info.

1 Like

Hi @Pablo_Sanchez , as i know as the default of CSV, it will convert too long number to E+, there’s no way for u to change it to long number format like what u want. And it only for a display, the actual value still same like it was.

1 Like

Let me try it. Correct me if Im wrong but you are adding an equal (=) at the begining and in the end you are adding double quotes twice (“”)?

Ty

Yes

Of course, here it is (i had to .zip the file because the forum doesnt allow me upload a .csv file)
Sample.zip (415 Bytes)

PS: I had to add “.” at the first column because if i don’t, when I save the .csv file, it erase all the begining empty columns. My real .csv file (the one which my robot writes) becomes with column A and column B totally empty. The first column with data should be column C.

This is what i got, but I guess it wont work for me. I need to upload the file to third web application and it wouldnt accept that kind of value for desired columns (it has to be the number)

it looks like there is a mistake in your syntax…
please check my screenshot


“[1]=”[3] & row(“NumberColumn”).ToString & "[4]

[1] represents the count of double quotes

alternatively you try this

1 Like

Wow, truly king there =). You did it

The only thing I wonder now is if my third party web app would accept this. I mean, I dont know if the app would read just the number as the above image, or instead it will read the cell value, which is:
image

Thank you very much sir, I’m gonna try upload it and will comeback with feedback

Great !
If the web app faces any issue with file then stick with your normal write csv file.
It is just excel which show value like that… in web app it should be fine.

1 Like

The app still failing :smiling_face_with_tear: but you did what i asked for, so i marked it as solution

Thank you sir!
Cheers

Hi @Pablo_Sanchez ,
I think it because on top solutions, u change the Numeric value to Text, that’s why your app cannot use it.
U can just export it as CSV, and dont open it, after that just use it in your apps.

1 Like

I did it but the app still failing… I guess this work whenever it wants :rofl:

Thank you anyway sir,
cheers

LOL. No hope then, should find out what kind of data that can be read by the apps.

1 Like

I would have been more than happy if it worked for you.
What is the error message you get from the app ?

1 Like