使用 SAP OLE 程式碼取內部表並將其貼上到 Excel 檔案中


請注意,所有要放入一個單元格的文字都必須用“雙引號”表示,然後分別使用 0X09 和 0X0A 連線單元格,以分別表示下一列和下一行。

檢視以下程式碼,因為它用 2 行填充了兩個單元格

CONSTANTS:
   nextC TYPE abap_char1 VALUE cl_abap_char_utilities=>horizontal_tab,
   nextR TYPE abap_char1 VALUE cl_abap_char_utilities=>newline,
   quot TYPE abap_char1 VALUE '"'.
DATA:
   buffer TYPE string.
CONCATENATE quot 'R1C1L1' nextR 'R1C1L2' quot nextC quot 'R1C2L1' nextR 'R1C2L2' quot INTO buffer.

更新於:2019-12-11

602 次瀏覽

開啟您的職業生涯

完成課程以獲得認證

開始
廣告
© . All rights reserved.