Changing the value into proper number format

Hello,

I need to convert “2,1401E+11” These kinds of values to the proper number

Note: I don’t want to change that in excel need change the format while runtime

It’s Urgent
@Yoichi @ppr @Palaniyappan @lakshman @rahulsharma

Regards
Sudharsan

Hi @Sudharsan_Ka

Try out this yourstring.ToString(“#,##0”)

So i have a question

I have used this and if the value in excel is already in a proper format it will not affect right?

It’s throwing an error

Hi @Sudharsan_Ka ,

try below code.
CDbl("2,1401E+11").ToString("#,##0.00")

Regards,
Arivu

It is returning value but the value is wrong

Regards
Sudharsan

Hi,

If your original data is in Excel sheet and you read it with PreserveFormat option, can you try to turn off PreserveFormat option?
If your situation is not the above, can you elaborate more detials?

Regards,

The process is like it will seperate the duplicate and unique cases to new sheet and then it will process the cases

In the main sheet the format is fine after separating to the new sheet the format goes scientific
image

And also I have not checked preserve format

Regards
Sudharsan

Hi,

It seems excel format issue. So it might be better to not create new sheet but to copy a sheet with all cells preformatted as numbers.

Regards,

What i have done is after seperating I will change the form with balareva change cell type activity to change all the formats

it is working till now

In today’s input I got “00254876” like this what the bot does, as usual, it will separate in new sheet and change the format now the input is “254876”
This is the problem here

Regards
Sudharsan

@Sudharsan_Ka

One alternate way is to keep a template of the file, In the template you keep blank and do all the formatting

Now when you are using to write then copy that template file to your location and use that file to write Range

Hope this will help you

Thanks

Hi Sudharsan,

Just right your value in excel like that - '201620131897