QtExcel / QXlsx

Excel file(*.xlsx) reader/writer library using Qt 5 or 6. Descendant of QtXlsxWriter.
https://qtexcel.github.io/QXlsx/
MIT License
1.16k stars 359 forks source link

How to set a filter on column ? #150

Open Serial86 opened 3 years ago

Serial86 commented 3 years ago

Hi,

First your lib is very good. Thanks.

In the Excel example, I have no found example on the filter columns. Is it implemented ?

Thanks in advance, Serial86

j2doll commented 3 years ago

Dear @Serial86

The feature is not supported.

What exactly is the filter function you mentioned?

Serial86 commented 3 years ago

Hi. In Excel, when you have a column we can set a filter on this data column. For example if you have data with A D C C E A. You can filter on A D C E.

See in link https://support.microsoft.com/en-us/office/filter-data-in-a-range-or-table-01832226-31b5-4568-8806-38c37dcc180e

Thanks in advance.

j2doll commented 3 years ago

Thank you for reporting. I will register this issue to an enhancement.

Serial86 commented 3 years ago

Hi, Thanks in advance.

Le sam. 3 avr. 2021 à 11:06, Jay Two @.***> a écrit :

Thank you for reporting. I will register this issue to an enhancement.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/QtExcel/QXlsx/issues/150#issuecomment-812837905, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEZDE5FSQELV4XAQP524HU3TG3LBPANCNFSM4ZY4WNPQ .

aristocratos commented 2 years ago

@Serial86 @j2doll There is a pull request in in the old QtXlsxWriter repo: https://github.com/dbzhang800/QtXlsxWriter/pull/98 that I think would add the requested functionality. It includes setting auto filter, splitting panes and freezing panes. It works without problem when patched in to the current codebase of QXlsx.

But to qualify, it works without problem with my code, I don't know if it would cause issues with any functions I currently don't use. There should also probably be some additional error checking added if used, I noticed that when for example entering incorrect parameters for the freeze panes function instead of throwing or similar it just corrupts the generated file.

The linenumbers for the added code won't be correct but patching it manually by looking at the preceding and following code of the added codeblocks works.

Just a FYI /Cheers and thanks for the great library!