2008 May 21 2:55 PM
Hey All,
I am trying to use GUI_DOWNLOAD to download some HR data to an excel file and was running into some issues.
1] After downloading all the data to the excel file when I open the excel file the coulms are by default displayed in same column width. I have to then manually do Autofit to expand the columns. Is there any way to programatically do "Autofit".
2] Some data like Bank account numbers [type c(30)] are displayed in exponential for like 1E+12. I am aware that by clicking that field it does expand. Is there a way to fix this through coding. I know the maunual way of saving as an text file and using excels text import wizard to output as text. I want a coding way to do this.
3] The file by default is save as tablimited text file even if you name it "text.xls". Is there any way to save is as excel directly.
I dont intend to use OLE. Is there any way to fix these issues using GUI_DOWNLOAD.
Any input is higly appreciated.
Thanks
2008 May 21 3:13 PM
Hi,
For question 2.
If you prefix the data in the field with a single quote ' before you download the data to the file, excel will treat this as text instead of a number and not display it as an exponential number.
Regards,
Nick
Hey All,
I am trying to use GUI_DOWNLOAD to download some HR data to an excel file and was running into some issues.
1] After downloading all the data to the excel file when I open the excel file the coulms are by default displayed in same column width. I have to then manually do Autofit to expand the columns. Is there any way to programatically do "Autofit".
2] Some data like Bank account numbers [type c(30)] are displayed in exponential for like 1E+12. I am aware that by clicking that field it does expand. Is there a way to fix this through coding. I know the maunual way of saving as an text file and using excels text import wizard to output as text. I want a coding way to do this.
3] The file by default is save as tablimited text file even if you name it "text.xls". Is there any way to save is as excel directly.
I dont intend to use OLE. Is there any way to fix these issues using GUI_DOWNLOAD.
Any input is higly appreciated.
Thanks
2008 May 21 3:09 PM
1] After downloading all the data to the excel file when I open the excel file the coulms are by default displayed in same column width. I have to then manually do Autofit to expand the columns. Is there any way to programatically do "Autofit".
---> Excel settings, nothing can be done from SAP
2] Some data like Bank account numbers type c(30) are displayed in exponential for like 1E+12. I am aware that by clicking that field it does expand. Is there a way to fix this through coding. I know the maunual way of saving as an text file and using excels text import wizard to output as text. I want a coding way to do this.
---> Excel settings, nothing can be done from SAP
3] The file by default is save as tablimited text file even if you name it "text.xls". Is there any way to save is as excel directly.
---> Can't be done through GUI_DOWNLOAD
2008 May 21 3:13 PM
Hi,
For question 2.
If you prefix the data in the field with a single quote ' before you download the data to the file, excel will treat this as text instead of a number and not display it as an exponential number.
Regards,
Nick
2008 May 21 3:13 PM
This can be resolved with desktop office integration
http://help.sap.com/saphelp_nw04/helpdata/en/21/b531bce1ba11d2bdbe080009b4534c/frameset.htm
But is going to need some serious work
2008 May 21 3:19 PM
Sourav nick and ramiro, thanks for your reply.
Nick, I will try your suggestion for the bank numbers.
Ramiro, I do not intend to change the entire code.
2008 May 21 3:30 PM
I would suggest you to save your file as .txt and than open it in the Excel to avoid all the excel related problems.
You have to follow this steps to avoid 1E+18 like data.
1. Download the file in .txt
2. Open Excel .. blank sheet
3. Now, click on Open. Select your .txt file
4. One pop up will come ..."Text Import Wizard"
5. Select the fixed width or Delimited ... Press Next ...
6. Select appropriate delimitors or fixed length .. press Next
7. Select your coulumn (which has the problem), Select the "Text" radiobutton on the upper-right corner and finish.
Regards,
Naimesh Patel
2008 May 21 3:39 PM
Naimesh, Thank you for your reply. But in my question i have stated that i am aware of the manual way. the users dont want to do that. you know how they are :).
2] Some data like Bank account numbers type c(30) are displayed in exponential for like 1E+12. I am aware that by clicking that field it does expand. Is there a way to fix this through coding. I know the maunual way of saving as an text file and using excels text import wizard to output as text. I want a coding way to do this.
2008 Jul 08 3:54 AM
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |