如何从进度导出到中间合并单元格的excel?当我尝试导出时,它没有自己。 例如预期输出:进度4gl到Excel导出与合并单元格
merged cell with value 1 (3 cells)
other value 1
other value 1
merged cell with value 2 (3 cells)
other value 2
other value 2
merged cell with value 3 (3 cells)
other value 3
other value 3
我的输出是什么:
unmerged cell value 1
other value 1
other value 1
unmerged cell value 2
other value 2
other value 2
unmerged cell value 3
other value 3
other value 3
我导出到Excel代码:
DEFINE VARIABLE h-excel AS COM-HANDLE NO-UNDO.
DEFINE VARIABLE h-sheet AS COM-HANDLE.
DEFINE VAR w-invname AS CHAR INITIAL "insert excel fill here".
CREATE "Excel.Application" h-excel.
h-sheet = h-excel:Workbooks:OPEN (w-invname,,FALSE,,,,,,,,,,FALSE) NO-ERROR.
h-excel:visible = true.
h-excel:Cells:Select.
/*h-excel:Selection:ClearContents.*/
h-excel:Run("loading"). /* Run the Macro, up to 31 optional */
/* parameters can be passed */
/*h-excel:Quit().*/ /* Tell Excel to quit */
/*h-excel:Range("A" + STRING(5)):VALUE = "Date Covered " + STRING(fifr) + " - " + STRING(fito).*/
h-excel:Range("A" + STRING(6)):VALUE = "As of " + cbMon + STRING(fiyear).
h-excel:Range("A12"):Select.
/*h-excel:Workbooks:SaveAs("c:\hckiv9\crd\forms\KMCDAT1.xls",43,,,,,).*/
RELEASE OBJECT h-sheet.
RELEASE OBJECT h-excel.
END PROCEDURE.