PSExcel icon indicating copy to clipboard operation
PSExcel copied to clipboard

Add AutoFilter to Format-Cell

Open RamblingCookieMonster opened this issue 10 years ago • 7 comments

Per Filip Hasa's suggestion - Thanks Filip!

RamblingCookieMonster avatar Oct 07 '15 20:10 RamblingCookieMonster

Have the code written for this, but it only works in one direction (setting to true).

image

Will check on whether I'm doing it wrong, or whether a bug should be submitted for the EPPlus library.

RamblingCookieMonster avatar Oct 08 '15 18:10 RamblingCookieMonster

How about this: Spreadsheet1.ActiveSheet.AutoFilterMode = $false ? source: https://msdn.microsoft.com/en-us/library/aa199191(v=office.10).aspx

hasafi avatar Oct 08 '15 20:10 hasafi

But only one direction is fine ;) Can I test it?

hasafi avatar Oct 08 '15 20:10 hasafi

sure, just committed the change!

RamblingCookieMonster avatar Oct 08 '15 22:10 RamblingCookieMonster

thank you

I am missing something ;( it is not working for me

image

On Fri, Oct 9, 2015 at 12:03 AM Warren F. [email protected] wrote:

sure, just committed the change!

— Reply to this email directly or view it on GitHub https://github.com/RamblingCookieMonster/PSExcel/issues/20#issuecomment-146699666 .

hasafi avatar Oct 09 '15 07:10 hasafi

Hi!

A few steps that might help:

  • Re-download PSExcel from GitHub (PowerShellGallery is now behind)
  • Import-Module \Path\To\PSExcel -Force # or open a new session and import without Force
  • Format-Cell -AutoFilter $True # Using bool, to allow setting back to false at some point

If you open Format-Cell.ps1, you should see that parameter in the param() block:

image

Thanks!

RamblingCookieMonster avatar Oct 09 '15 11:10 RamblingCookieMonster

done. it is working like charm have you seen this? https://msdn.microsoft.com/en-us/library/aa199191(v=office.10).aspx

hasafi avatar Oct 09 '15 14:10 hasafi