‎2007 Feb 16 9:24 AM
Hi !
I create a report to download data in a excel file .
But when i pass a number 0001 the file excel puts 1 .
CALL METHOD OF sheet 'Cells' = cells EXPORTING #1 = index.
SET PROPERTY OF cells 'Value' = itab-objectid.
the itab-objectid as the zero but the file doesn't .
Thanks a lot !
Message was edited by:
Grazia Sasso
‎2007 Feb 16 9:30 AM
Hi!
In excel, if the filed has the value 0001, it will appear, depending on the cell format.
With cell format "Number" it will appear as 1.
With cell format "Text", it will appear as 0001.
Check your cell format in excel.
Regards
Tamá
‎2007 Feb 16 9:34 AM
Hi,
Me too had the same problem, you have to change it in excel only, becasue out of SAP u cant control anything.
You can look any options there in fieldcatalog, i dont think it will help, but u look.
‎2007 Feb 16 9:38 AM
So...can i set the cell format in abap code ? If yes....in which way ?
‎2007 Feb 16 9:44 AM
Hi!
You might try using excel-in-place instead of downloading. It is very easy to set up and maybe in this way it is possible to set cell formats. I don't know about setting excel cell formats in SAP, but if it can be done, it can be done this way.
Excel-in-place
1. Upload excel template into OAOR
2. Enabling the macros within excel
3. Consulting with SAP OSS Note 548409 - about the exact settings.
Regards
Tamá
‎2007 Feb 16 1:00 PM
‎2007 Feb 16 9:32 AM
to keep the value as 001 in excel sheet u need to put a '001 in the excel sheet and it will show as 001 in the excel output......may be u modify ur internal table data by appending ' to the field and then try to download to excel sheet and it will come as 001.