使用 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.

更新於:11 年 12 月 2019 日

602 次瀏覽

開啟你的職業生涯

完成此課程以獲得認證

開始學習
廣告
© . All rights reserved.