Class_Excel - Create excel file from array or listview

Post your working scripts, libraries and tools for AHK v1.1 and older
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Class_Excel - Create excel file from array or listview

22 Jun 2018, 09:11

Posted 2 years ago on chinese subforum, I guess I should post here.

Source

Functions:
  • CreateByArray(outputFile, arr)
  • CreateByHLV(outputFile, HLV, Obj_LV_Colors := "", IncludeLvHeader := false)
    • HLV - Listview hwnd
    • Obj_LV_Colors - Created by using 'New LV_Colors(HLV)'
Example1 - Array to excel
Example2 - Listview to excel
Example3 - Listview to excel (include colors)
Related script: ExcelToArray
burque505
Posts: 1735
Joined: 22 Jan 2017, 19:37

Re: Class_Excel - Create excel file from array or listview

22 Jun 2018, 09:57

@tmplinshi, thanks for this also! For those who may not have the classes, I've attached a .7z archive with your examples, Class_Excel.ahk and Class_LV_Colors.ahk.
By the way, have you done anything with EPPlus.dll? I have seen your post here about ExcelLibrary, and I thought you might be interested in EPPlus.
Create advanced Excel spreadsheets using .NET, without the need of interop.
EPPlus is a .NET library that reads and writes Excel files using the Office Open XML format (xlsx). EPPlus has no dependencies other than .NET.
I've been trying to use it with Clr_LoadLibrary(), but no luck so far.
Regards,
burque505
tmplinshi.7z
(5.96 KiB) Downloaded 74 times
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: Class_Excel - Create excel file from array or listview

22 Jun 2018, 13:47

@burque505 I tried some hours on EPPlus, it's really like solving a puzzle :crazy: . Fortunately I finally made some working code, I've replied in your topic Help with EPPlus.dll and AHK.
burque505
Posts: 1735
Joined: 22 Jan 2017, 19:37

Re: Class_Excel - Create excel file from array or listview

22 Jun 2018, 14:06

I saw that, thank you!!!!!! After using dnspy that qwerty12 mentioned, I thought, gee, this is going to be easy. Everything is listed! But :headwall: .
That is really great, you made my weekend.
Regards,
burque505

Return to “Scripts and Functions (v1)”

Who is online

Users browsing this forum: No registered users and 147 guests