06-22-2010 4:19 PM
We are using the following code to produce an Excel Spreadsheet. But the parameter WRITE_BOM is not working - SAP does not write a byte-order mark to the file. The result is that Excel does not open the file correctly. When we add the BOM manually in UltraEdit the file opens correctly.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = 'C:\export.xls'
filetype = 'DAT'
trunc_trailing_blanks = 'X'
write_field_separator = 'X'
codepage = '4310'
write_bom = 'X'
TABLES
data_tab = gt_textsi
EXCEPTIONS
06-23-2010 2:48 AM
Please check the function help:
Short Text
If set, writes a Unicode byte order mark
Description
If data is written in a Unicode codepage, at the top of the file the
respective byte order mark (BOM) is included.
Unicode - Little Endian codepage 4103, binary values 'FFFE'
Unicode - Big Endian codepage 4102, binary values 'FEFF'
UTF-8 codepage 4110, binary values 'EFBBBF'
Note: Microsoft Excel supports Unicode data only if they have been
written in Unicode - Little Endian format.
06-23-2010 2:48 AM
Please check the function help:
Short Text
If set, writes a Unicode byte order mark
Description
If data is written in a Unicode codepage, at the top of the file the
respective byte order mark (BOM) is included.
Unicode - Little Endian codepage 4103, binary values 'FFFE'
Unicode - Big Endian codepage 4102, binary values 'FEFF'
UTF-8 codepage 4110, binary values 'EFBBBF'
Note: Microsoft Excel supports Unicode data only if they have been
written in Unicode - Little Endian format.
06-23-2010 8:40 AM