EasyXLS
http://forum.easyxls.com/

Allow AutoFilter in protected sheets.
http://forum.easyxls.com/viewtopic.php?f=5&t=2155
Page 1 of 1

Author:  Manveru [ Sat Jun 02, 2012 12:01 pm ]
Post subject:  Allow AutoFilter in protected sheets.

Hello everyone!
I'm currently working on a sheet that, after exporting, should be protected (only specific cells allow editing) and at the same time should allow the user to use AutoFilters for sorting etc.

Now, when I set the sheet to protected
Code:
xlsWorksheet.setSheetProtected(true);

the AutoFilters
Code:
ExcelFilter xlsFilter = xlsWorksheet.easy_getFilter();
xlsFilter.setAutoFilter("A3:G3");

are not usable anymore (do not react on clicking on them).

On this page
Code:
contextures com xlautofilter03 html#Protect
(Sorry, I'm not allowed to post a link as new user)
they say that there is an option to allow AutoFilter while setting up the protection or, as in older versions, a vba command for allowing them.

How is this done with EasyXLS?

I couldn't find any hint in the docu...

Greetings
Manveru

Author:  oana [ Sun Jun 03, 2012 3:16 am ]
Post subject:  Re: Allow AutoFilter in protected sheets.

Hi Manveru,
EasyXLS preserves macros for .xls files. Therefore, you can create an .xls template having your macro, load this file and then add your data.

Author:  Manveru [ Tue Jun 12, 2012 2:09 am ]
Post subject:  Re: Allow AutoFilter in protected sheets.

Hi oana

Storing an Excel template on the server was admittedly not the answer I hoped for but is certainly a possibility.

Thank you.
Manveru

Author:  oana [ Tue Jun 12, 2012 2:24 am ]
Post subject:  Re: Allow AutoFilter in protected sheets.

You are very welcome Manveru.

Page 1 of 1 All times are UTC - 4 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/