Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Data Conversion

Former Member
0 Likes
957

Hi All,

I have writeen code to retrive data from BSEG for WRBTR field.

When I downloaded the data to my local pc in ".CSV" file format.

When I observed in file.

I got to know that.

currency having value as 500.00

is displayed with 500.

But others having value like 500.45 is displayed as 500.45.

I want to know y this happens and I wanted the value as 500.00 in file also.

Pls provide me solution.

7 REPLIES 7
Read only

Former Member
0 Likes
937

write the field to a Char field before adding it to your CSV record.

Write it using edit mask. Something like '________.__' should solve this.

Read only

Former Member
0 Likes
937

Hi,

What you are seeing is the standard behavior of Excel. Check your file in a text editor, you will find the decimal places are there, it is just when viewing as a spreadsheet that it hides zero decimals.

Regards,

Nick

Read only

Former Member
0 Likes
937

Hi,

This is the standard behaviour to truncate the zeros after decimal.

But if you need them then you can use Edit Mask. This should solve your problem.

Regards,

Lalit Kabra

Read only

former_member195383
Active Contributor
0 Likes
937

Hi this can not be avoided...Because...If u see in an excel..

when u type 500.00, it will take 500 only...

where as if some numbers otherthan 0 are present those will appear....

Read only

Former Member
0 Likes
937

Edit Mask is not solving my problem.

I think in spread sheets, the cell is in text format, it ignores zeros after decimal place.

But How can I solve since client is specifically asking this.

Read only

0 Likes
937

after downloading the file in CSV for mat..try changing the

for mat of the numbers..in excel.....That ll be possible...

Go to Format--> Cells -->Number.

there give Number format...

Thats the only way u can change the format after downloading

Read only

Former Member
0 Likes
937

Convert that column to text format using excel properties.

Select column --->right click & change column format to text.

You will get zero's

Thanks

Gaurav J.