I have an issue when copying an AS400 file to the IFS. One field that is defined as 15 charachter and contains numeric data does not show up in .csv format correctly without reformatting the column to special. I also tried defining the field as numeric, and had the same result.
Example of data displayed: 8.1228E+13, where the value is displayed as 81228000000001.
Is there an option on the CPYTOIMPF command the resolve this? I also tried the CPYTOSTMF without any luck.
Thank you!
Software/Hardware used:
ASKED:
January 6, 2009 8:39 PM
UPDATED:
January 20, 2009 2:14 PM
This isn’t exactly an AS/400 problem.
You’ve sent the correct value to excel but it’s decided to show it in this format.
In Excel click on the field and you will see the number in the formula pane.
Format the cell (or all the cells in the column) to number and set the column width wide enough so you will see the numbers.
Using HSSF an rpg program could create the spreadsheet and set the column width and I believe set the format but that’s a chunk of work and a chunk of processor time.
Phil
You will need to create a cwbtfr.ini file. Refer to:
http://www-01.ibm.com/support/docview.wss?uid=nas1352f81ff9d0d4c86862565c2007cae44
Excel will need to be restarted before it takes effect.
http://itknowledgeexchange.techtarget.com/itanswers/importing-an-excel-tab/
See if that works.
Chris
Cjdugas
This documentation and everything I can google on this cwbtfr.ini file refer to it’s use with Client Access.
Does it effect Excel outside that process .. ie: CPYTOIMPF.???
Phil
After reviewing the original posting, I believe you are correct. The .ini file should have no effect on the opening of a .CSV in Excel
What the .ini did do for me was to prevent the automatic conversion of long numbers into scientific notation when using data transfers and ODBC queries. I was experiencing a number conversion before the value would hit the cell. No amount of cell manipulation would correct it. Installing the .ini and changing the value worked like a charm.
This .ini has not adversely affected any of my day-to-day 400-to-excel transfers. I recommend it.
Cjdugas
Thanks, this is really good info.
Phil