Export wxListCtrl Data to Excel

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
purplex88
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 247
Joined: Mon Feb 24, 2014 3:14 pm

Export wxListCtrl Data to Excel

Post by purplex88 »

I will have thousands of items in wxListCtrl in future. So, is it possible to export the rows and columns of wxListCtrl Data to Excel file?

Second question: I also read somewhere that there's a virtual wxListCtrl or something which is somehow able to handle that many items. Is that also true?
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: Export wxListCtrl Data to Excel

Post by PB »

purplex88 wrote:I will have thousands of items in wxListCtrl in future. So, is it possible to export the rows and columns of wxListCtrl Data to Excel file?
There is no direct wxWidgets support for writing Excel files, you would need a 3rd party library for that.
purplex88 wrote:Second question: I also read somewhere that there's a virtual wxListCtrl or something which is somehow able to handle that many items. Is that also true?
It is just a style flag used for creating wxListCtrl: wxLC_VIRTUAL (must be used with wxLC_REPORT), see wxListCtrl documentation for more.
rando
Knows some wx things
Knows some wx things
Posts: 35
Joined: Fri Nov 09, 2018 9:11 pm

Re: Export wxListCtrl Data to Excel

Post by rando »

You can save your data to a text file in tab separated values format. I use a *.tsv extension and then associate that with Excel (you can do that programatically). Excel can open a tsv file directly, and you can save it to another excel format from within Excel if you want.
User avatar
doublemax
Moderator
Moderator
Posts: 19158
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Export wxListCtrl Data to Excel

Post by doublemax »

There are a couple of C and C++ libraries that support writing to xls or at least xlsx files, free and commercial.

E.g. https://sourceforge.net/projects/xlsxio/

But i've never used one, so i can't recommend one.
Use the source, Luke!
banovsha
In need of some credit
In need of some credit
Posts: 7
Joined: Mon Oct 23, 2023 10:18 am

Re: Export wxListCtrl Data to Excel

Post by banovsha »

Hello

I have the issue I would like to save the list items, when i run a program i want to see previous list items
Post Reply