Code: Select all
#Include, <CLASS_LV_COLORS>
#Include, <CLASS_EXCEL>
Gui, Add, ListView, x5 y5 w200 r10 vCTRL_LV1 hwndHLV1, aaaaaaa|bbbbbbb|cccccc|dddddd
Loop, 5
LV_Add("", "Col1" A_Index, "Col2" A_Index, "Col3" A_Index, "Col4" A_Index)
CLV1 := New LV_Colors(HLV1)
CLV1.Row(2, 0xA6F9A6)
CLV1.Cell(2, 2,, 0xff0000)
CLV1.Cell(3, 2, 0xff0000)
Gui, Add, ListView, x5 y205 w200 r10 vCTRL_LV2 hwndHLV2, aaaaaaa|bbbbbbb|cccccc
Loop, 5
LV_Add("", "Col1" A_Index, "Col2" A_Index, "Col3" A_Index)
CLV2 := New LV_Colors(HLV2)
CLV2.Row(2, 0xFF00CC)
CLV2.Cell(2, 2,, 0x50BFE6)
CLV2.Cell(3, 2, 0xFF355E)
Gui, Add, ListView, x210 y5 w200 r10 vCTRL_LV3 hwndHLV3, aaaaaaa|bbbbbbb
Loop, 10
LV_Add("", "Col1" A_Index, "Col2" A_Index)
CLV3 := New LV_Colors(HLV3)
CLV3.AlternateRows(0xFF00CC)
Gui, Add, ListView, x210 y210 w200 r10 vCTRL_LV4 hwndHLV4, aaaaaaa|bbbbbbb|ccccccc|ddddddddd
Loop, 5
LV_Add("", "Col1" A_Index, "Col2" A_Index, "Col3" A_Index, "Col4" A_Index)
CLV4 := New LV_Colors(HLV4)
CLV4.AlternateCols(0xFF00CC)
Gui, show
Gui, ListView, CTRL_LV1
Excel.CreateByHLV("ListView_1.xlsx", HLV1, CLV1, True)
Gui, ListView, CTRL_LV2
Excel.CreateByHLV("ListView_2.xlsx", HLV2, CLV2, True)
Gui, ListView, CTRL_LV3
Excel.CreateByHLV("ListView_3.xlsx", HLV3, CLV3, True)
Gui, ListView, CTRL_LV4
Excel.CreateByHLV("ListView_4.xlsx", HLV4, CLV4, True)
Return
GuiClose:
ExitApp
Return