resolved merge conflicts

This commit is contained in:
dfinke
2018-06-30 20:46:54 -04:00
13 changed files with 2532 additions and 941 deletions

View File

@@ -37,39 +37,49 @@ iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/dfi
# What's new
#### 6/26/2018
- New commands - Diff , Merge and Join
- `Compare-Worksheet` (introduced in 5.0) uses the built in `Compare-object` command, to output a command-line DIFF and/or color the worksheet to show differences. For example, if my sheets are Windows services the *extra* rows or rows where the startup status has changed get highlighted
- `Merge-Worksheet` (also introduced in 5.0) joins two lumps, side by highlighting the differences. So now I can have server A's services and Server Bs Services on the same page. I figured out a way to do multiple sheets. So I can have Server A,B,C,D on one page :-) that is `Merge-MultpleSheets`
For this release I've fixed heaven only knows how many typos and proof reading errors in the help for these two, but the code is unchanged - although correcting the spelling of Merge-MultipleSheets is potentially a breaking change (and it is still plural!)
also fixed a bug in compare worksheet where color might not be applied correctly when the worksheets came from different files and had different name.
- `Join-Worksheet` is **new** for this release. At it's simplest it copies all the data in Worksheet A to the end of Worksheet B
- Add-Worksheet
- I have moved this from ImportExcel.psm1 to ExportExcel.ps1 and it now can move a new worksheet to the right place, and can copy an existing worksheet (from the same or a different workbook) to a new one, and I set the Set return-type to aid intellisense
- New-PivotTableDefinition
- Now Supports `-PivotFilter` and `-PivotDataToColumn`, `-ChartHeight/width` `-ChartRow/Column`, `-ChartRow/ColumnPixelOffset` parameters
- Set-Format
- Fixed a bug where the `-address` parameter had to be named, although the examples in `export-excel` help showed it working by position (which works now. )
- Export-Excel
- I've done some re-factoring
1. I "flattened out" small "called-once" functions , add-title, convert-toNumber and Stop-ExcelProcess.
2. It now uses Add-Worksheet, Open-ExcelPackage and Add-ConditionalFormat instead of duplicating their functionality.
3. I've moved the PivotTable functionality (which was doubled up) out to a new function "Add-PivotTable" which supports some extra parameters PivotFilter and PivotDataToColumn, ChartHeight/width ChartRow/Column, ChartRow/ColumnPixelOffsets.
4. I've made the try{} catch{} blocks cover smaller blocks of code to give a better idea where a failure happened, some of these now Warn instead of throwing - I'd rather save the data with warnings than throw it away because we can't add a chart. Along with this I've added some extra write-verbose messages
- Bad column-names specified for Pivots now generate warnings instead of throwing.
- Fixed issues when pivot tables / charts already exist and an export tries to create them again.
- Fixed issue where AutoNamedRange, NamedRange, and TableName do not work when appending to a sheet which already contains the range(s) / table
- Fixed issue where AutoNamedRange may try to create ranges with an illegal name.
- Added check for illegal characters in RangeName or Table Name (replace them with "_"), changed tablename validation to allow spaces and applied same validation to RangeName
- Fixed a bug where BoldTopRow is always bolds row 1 even if the export is told to start at a lower row.
- Fixed a bug where titles throw pivot table creation out of alignment.
- Fixed a bug where Append can overwrite the last rows of data if the initial export had blank rows at the top of the sheet.
- Removed the need to specify a fill type when specifying a title background color
- Added MoveToStart, MoveToEnd, MoveBefore and MoveAfter Parameters - these go straight through to Add worksheet
- Added "NoScriptOrAliasProperties" "DisplayPropertySet" switches (names subject to change) - combined with ExcludeProperty these are a quick way to reduce the data exported (and speed things up)
- Added PivotTableName Switch (in line with 5.0.1 release)
- Add-CellValue now understands URI item properties. If a property is of type URI it is created as a hyperlink to speed up Add-CellValue
- Commented out the write verbose statements even if verbose is silenced they cause a significant performance impact and if it's on they will cause a flood of messages.
- Re-ordered the choices in the switch and added an option to say "If it is numeric already post it as is"
- Added an option to only set the number format if doesn't match the default for the sheet.
-Export-Excel Pester Tests
- I have converted examples 1-9, 11 and 13 from Export-Excel help into tests and have added some additional tests, and extra parameters to the example command to get better test coverage. The test so far has 184 "should" conditions grouped as 58 "IT" statements; but is still a work in progress.
-Compare-Worksheet pester tests
* Added Merge-Worksheet.ps1 so the install and publish will include this
* Now allows you to name the pivot table sheet name when using `-IncludePivotTable`
* Demo of the `-PivotTableName` parameter
* Added `-UseMSSQLSyntax` to code gen INSERT INTO correct format format
* Demo of the `-UseMSSQLSyntax` parameter [DemoSQLInsert](Examples/ExcelToSQLInsert/DemoSQLInsert.ps1)
---
#### 06/08/2018
Thank you again to [James O'Neill](https://twitter.com/jamesoneill) for the lion share of these updates.
Most notably the performance gains in the `Import-Excel` function.
In addition, I have started to create tests and wired up Appveyor for continuous integration
This release will be bumped to 5.0.0 and will be published officially after more testing.
* added databar to Examples
* Fix databar example
* increased how long the import should take
* Renamed test directory
* Added PSVersion. Point to the new directory for tests
* Added EndRow, StartColumn, EndColumn to Import-Excel
* Added Merge-MultipleSheets to argument completers
* added build badge
* Making Merge-Worksheet, and Merge-MultipleWorksheet ready to release
* Added Merge Multiple worksheet
* Revert "Added Multiple Merge to Merge-Worksheet.ps1"
* Added Multiple Merge to Merge-Worksheet.ps1
* Added Merge-worksheet
* Force install of pester
* Checks version of pester on appveyor
* First step to wire up appveyor
* 13 days ago : Tidying of case, parameter clarity, removal of aliases. Added timeout to send-SqlDataToExcel Added Merge WorkSheet Fixed bugs in Compare-Worksheet
- [James O'Neill](https://twitter.com/jamesoneill) added `Compare-Worksheet`
- Compares two worksheets with the same name in different files.
#### 4/22/2018
Thanks to the community yet again
@@ -631,7 +641,7 @@ Or
#### 9/25/2015
**Hide worksheets**
Got a great request from [forensicsguy20012004](https://github.com/forensicsguy20012004) to hide worksheets. You create a few pivot tables, generate charts and then pivot table worksheets don't need to be visible.
Got a great request from [forensicsguy20012004](https://github.com/forensicsguy20012004) to hide worksheets. You create a few pivotables, generate charts and then pivot table worksheets don't need to be visible.
`Export-Excel` now has a `-HideSheet` parameter that takes and array of worksheet names and hides them.
@@ -823,4 +833,4 @@ You can also find EPPLus on [Nuget](https://www.nuget.org/packages/EPPlus/).
* Using `-IncludePivotTable`, if that pivot table name exists, you'll get an error.
* Investigating a solution
* *Workaround* delete the Excel file first, then do the export
* *Workaround* delete the Excel file first, then do the export