https://bugs.documentfoundation.org/show_bug.cgi?id=167117

--- Comment #7 from R. Diez <[email protected]> ---
Thanks for the pointers. I do not know enough yet, but it seems that there is a
way to create an AutoFilter via the API with a DatabaseRange, and another way
with the given script, which does not seem to use a DatabaseRange at all.

I'll investigate those alternatives the next time I have to modify my code. At
the moment, the workaround I implemented (adding extra dummy column headers)
does the trick for me.

I created this bug report because I think users shouldn't fight with Calc and
search in the forums and puzzle all the information together in order to do
this task.

I would clearly document whether the ".uno:DataFilterAutoFilter" dispatch
should be avoided when programmatically creating filters (especially with
--headless), because it may break due to the prompting, and which alternative
is the "right" one. And why the number of columns matter. Or maybe it shouldn't
really matter, and the LibreOffice code needs to be modified. Note that some of
the code in the forums would break (or unnecessarily prompt) with less than 3
columns. Or perhaps you can pass some arguments to ".uno:DataFilterAutoFilter"
to always prevent the prompting, and then the number of columns and --headless
are then irrelevant.

The aim is to prevent other users from having this kind of trouble in the
future.

If I had the necessary time and skills I would do it myself. In the meantime, I
hope that this bug report helps other people save some time if they encounter
the same unexpected problem. If you mark it as "invalid" and/or close it,
chances are that this kind of trouble remains unfixed forever, and that other
users do not find this information easily.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to