QXlsx icon indicating copy to clipboard operation
QXlsx copied to clipboard

How to set a filter on column ?

Open Serial86 opened this issue 4 years ago • 5 comments
trafficstars

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

Serial86 avatar Mar 25 '21 08:03 Serial86

Dear @Serial86

The feature is not supported.

What exactly is the filter function you mentioned?

j2doll avatar Mar 28 '21 13:03 j2doll

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.

Serial86 avatar Mar 28 '21 19:03 Serial86

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

j2doll avatar Apr 03 '21 09:04 j2doll

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 .

Serial86 avatar Apr 03 '21 11:04 Serial86

@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!

aristocratos avatar May 05 '22 05:05 aristocratos