‎2008 Nov 13 4:12 AM
Hi All,
I'm using FM 'WS_EXCEL' to download Customer and bank details to an excel file.
When the bank account number (knbk-bankn) is large like 254...20 it is
been displayed as 2.54E+15, but our user want it to be displayed in full format without any manual cell formatting.
Please suggest a solution for this.
Thanks in advance.
Regards,
Manoj Kumar P
‎2008 Nov 13 4:51 AM
hi
It is an Excel issue. For example if you enter 222222222222222222 in any cell of Excel sheet , it takes it as 2.22222E+17. So one solution I can give is instead of giving account number as 222222222222222222 give as 22222222222-2222222 to
FM WS_EXCEL. If there are more than 11 digits continuously, Excel considers it as number and acts accordingly. If there is any character or space in between Excel will not consider it as number
‎2008 Nov 13 4:44 AM
Duplicate Post of; by Read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/HOME/RulesofEngagement] before posting more. Are you working for a same company or thats your another User Id?
Regards
Karthik D
‎2008 Nov 13 5:04 AM
Hi Karthik,
It is neither that post is from my another id nor we aork for the same company.
More over that is the duplicate post of mine.
Please refer the time of posting.
Regards,
Manoj Kumar P
‎2008 Nov 13 5:12 AM
Hi,
See my reply here
DATA : it_KNBK type table of KNBK.
select * from KNBK
into table it_KNBK.
CALL FUNCTION 'MS_EXCEL_OLE_STANDARD_DAT'
EXPORTING
FILE_NAME = 'C:Documents and SettingssapDesktopank2.xls'
* CREATE_PIVOT = 0
* DATA_SHEET_NAME = ' '
* PIVOT_SHEET_NAME = ' '
* PASSWORD = ' '
* PASSWORD_OPTION = 0
TABLES
* PIVOT_FIELD_TAB =
DATA_TAB = it_KNBK
* FIELDNAMES = it_KNBK
* EXCEPTIONS
* FILE_NOT_EXIST = 1
* FILENAME_EXPECTED = 2
* COMMUNICATION_ERROR = 3
* OLE_OBJECT_METHOD_ERROR = 4
* OLE_OBJECT_PROPERTY_ERROR = 5
* INVALID_PIVOT_FIELDS = 6
* DOWNLOAD_PROBLEM = 7
* OTHERS = 8
.
IF SY-SUBRC <> 0.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
* WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Regards
‎2008 Nov 13 4:51 AM
hi
It is an Excel issue. For example if you enter 222222222222222222 in any cell of Excel sheet , it takes it as 2.22222E+17. So one solution I can give is instead of giving account number as 222222222222222222 give as 22222222222-2222222 to
FM WS_EXCEL. If there are more than 11 digits continuously, Excel considers it as number and acts accordingly. If there is any character or space in between Excel will not consider it as number
‎2008 Dec 06 5:23 AM
Hi All,
Thanks for giving your sugggestions.
I solved that issue by using OLE.
Regards,
Manoj Kumar P