This project has moved. For the latest updates, please go here.

AutoFilter breaks after conversion to XL 2003 format.

Developer
Oct 25, 2011 at 11:40 AM
Edited Oct 25, 2011 at 11:43 AM

It seems that Microsoft Excel 2003 Converter (see MS compatibility pack) requires that the AutoFilter range be also defined as special named range "_xlnm._FilterDatabase" (see OpenXml documentation).

I'm not sure if this is really necessary to be done automatically by ClosedXML but following code works well as a workaround in case somebody needs it:

var range = sheet.Range(sheet.FirstCellUsed(), sheet.LastCellUsed());
range.SetAutoFilter();							// enough for XL 2007
range.AddToNamed("_xlnm._FilterDatabase", XLScope.Workbook, "");	// necessary for XL 2003
Coordinator
Oct 26, 2011 at 7:09 PM

This has already been added. Are you using the latest version?

Developer
Oct 26, 2011 at 7:31 PM
Hmm, you are right, was using older dll. Assume this has been addressed so I'll retest on the latest. Thanks.


On 26 Oct 2011, at 20:10, "MDeLeon" <notifications@codeplex.com<mailto:notifications@codeplex.com>> wrote:


From: MDeLeon

This has already been added. Are you using the latest version?

Read the full discussion online<http://closedxml.codeplex.com/discussions/277108#post689783>.

To add a post to this discussion, reply to this email ([email removed]<mailto:[email removed]?subject=[closedxml:277108]>)

To start a new discussion for this project, email [email removed]<mailto:[email removed]>

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe<https://closedxml.codeplex.com/discussions/277108/unsubscribe/> on CodePlex.com<http://CodePlex.com>.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com<http://CodePlex.com>