|
Bit sad, but anybody familiar with these two? I'm fine on the Cobol, but don't understand Excel. I've got a PIC X(6) containing numeric data which gets ported over to Excel just fine. But there's also a PIC X(20) field, also with numeric data, and Excel treats this like a large numeric and puts it in as an overflow, i.e. 81211111000000000000 comes out as 8.12222 E+19. I'm not doing any math with the fields, I just need them ported straight over. The Excel fields have a format of 'General'. /wishes he's never agreed to test this for the 'mad genius of Tech Support' |
Cobol PIC X field to MS Excel cell
-
boo 13,901 posts
Seen 7 days ago
Registered 18 years ago -
Format them as text maybe? -
mal 29,326 posts
Seen 4 years ago
Registered 20 years agoboo wrote:
But 8.12222E+19 is 81222200000000000000, which is the same as 81211111000000000000, give or take. I expect the data is getting ported over fine, it's just a presentation issue.
But there's also a PIC X(20) field, also with numeric data, and Excel treats this like a large numeric and puts it in as an overflow, i.e. 81211111000000000000 comes out as 8.12222 E+19.
I'm not doing any math with the fields, I just need them ported straight over.
/doesn't really know excel. Doesn't really know what a PIC X is, or how it would releate to COBOL. -
Boo: Excel is just displaying the number using scientific notation. When you click on the cell you should see the original number (to 14 places) in the entry bar at the top of Excel. If you must see it as entered in the spread sheet then format the cell as a number.
Sometimes posts may contain links to online retail stores. If you click on one and make a purchase we may receive a small commission. For more information, go here.
