Skip to Content
0
Former Member
Jul 21, 2008 at 09:50 PM

Question about output in Excel file

48 Views

Hi all experts

I am trying to export a report to excel sheet. Got one problem, in the report there are codes of companies, like "09", "08", but when exported by using WS_EXCEL FBS, i got the result "9", "8".

That is> the Zero at the beginning is lost.

How can i solve this problem easily?

question2, how can i make the alignment better. (now some are left and some are right aligned)

thank you !

here is my coding

CALL FUNCTION 'WS_EXCEL'

EXPORTING

FILENAME = file1

SYNCHRON = ' '

TABLES

data = tab_comp

EXCEPTIONS

UNKNOWN_ERROR = 1

OTHERS = 2

.

file1 = 'c:\tmp\b.xls'

Richard