-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Kkazala/exportformatting #1208
Kkazala/exportformatting #1208
Conversation
…tting rules in a 'ready to use' format
@kkazala Thank you for the PR and suggestion about adding the examples to the readme. Is it possible, I like the
I may add this to this to the core library. Thanks again. |
@dfinke cool, will do And... you just gave me an idea. Would you consider, instead of an example, adding an exportFormatting function? If you still would like it to be an example, could you suggest a folder the excel? I don't want to disorganize the project:) |
Thanks. I like the idea of an export formatting function. I usually create examples and so I can try before I promote it to the core. That way it fleshes out issues, edge cases etc. Helps for writing unit tests. For the excel file for the example? You can put it next to the example ps1 file. If I understand your question. |
@dfinke I added the Excel as requested, the file name is GetConditionalFormatting.xlsx to make sure the excel and the script are next to each other Please let me know if there's anything else |
Please double check this line. The I like the idea behind this. Dump Excel constructs as PowerShell code. Write-Host "Add-ConditionalFormatting -Worksheet `$excel[""$worksheetName""] -Range '$($_.Address)' -ConditionValue '$($_.Formula)' -RuleType $($_.Type) " |
@dfinke Sorry about that, I was a bit in a rush. Fixed now. |
@dfinke Would you be interested in one new, and one updated example?
I updated the Highlight-DiffCells.ps1 to format both compared cells, and the whole row:
And I added an example (GetConditionalFormatting.ps1) that exports conditional formatting rules in a "ready to use" format, so if someone has better grasp on Excel than the
Add-ConditionalFormatting
, they won't need to open an issue with youAnd a question: would you consider mentioning the examples on https://github.com/dfinke/ImportExcel? I'm a bit ashamed to admit, but I had no idea they are there until you asked me to contribute 🙈