How to set "autofilter" to true in C#

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
winchell
Posts: 10
Joined: Thu Mar 31, 2022 5:45 am

How to set "autofilter" to true in C#

Post 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#?
OpenOffice 7.3 on Windows 10
User avatar
MrProgrammer
Moderator
Posts: 4906
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

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

Post 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.
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
winchell
Posts: 10
Joined: Thu Mar 31, 2022 5:45 am

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

Post 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#
OpenOffice 7.3 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Post by Villeroy »

Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply