Page 1 of 1

Set "autofilter" to true in C#

Posted: Thu Apr 14, 2022 6:13 am
by winchell
Hi i am working on libre calc C# developing.
As i checked the autofilter is a field in DataBaseRange.
How can i set the property "autofilter" for a specific range in C#?

Re: How to set "autofilter" to true in C#

Posted: Thu Apr 14, 2022 6:47 am
by MrProgrammer
winchell wrote:How can i set the property "autofilter" for a specific range in C#?
Record a macro of selecting the range and enabling AutoFilter. Translate the recorded macro from StarBasic to C#.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.

Re: How to set "autofilter" to true in C#

Posted: Thu Apr 14, 2022 7:35 am
by winchell
MrProgrammer wrote:
winchell wrote:How can i set the property "autofilter" for a specific range in C#?
Record a macro of selecting the range and enabling AutoFilter. Translate the recorded macro from StarBasic to C#.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the subject field. Select the green checkmark icon at the same time.
How to translate macro from startBasic toC#?
In macro. there is :

Code: Select all

dispatcher.executeDispatch(document, ".uno:DataFilterAutoFilter", "", 0, Array())
I cant use it in C#

Re: How to set "autofilter" to true in C#

Posted: Fri Apr 15, 2022 11:34 am
by Villeroy