Changed Export-Excel.ps1
#1 @ Line 197 Made new parameter sets . Default, and table already
existed and use path. Added DefaultPackage and TablePackage
A New parameter "Package" allows an ExcelPackage object returned by
-passThru to be passed in
~Line 400 code to use package or path depending on path passed.
(also added Open-ExcelPackage to get the object without exporting and
Close-ExcelPackage to close it nicely - these are in their own file)
#2. @ Line 256 added new parameter excludeProperty to remove unwanted
properties without needing to go through select-object
~Line 459 added logic to exclude the properties specified in the new
parameter
#3 . @ Line 262 Added new parameter Append
~Line 420 code to read the existing headers and move the insertion point
below the current data
(normal behaviour is to check if headers exist when adding data in the
process block, which makes this change wonderfully easy)
~Line 510 changed basis for identifying named ranges and changed scope
for rangeName so it can be used on other sheets
#4. ~Line 550. Remove any existing Pivot table before trying to
[re]create it.
Added formatting.ps1 which applies conditional and normal formats -
requires an ExcelPackage to be open.
Added Open-ExcelPackage.ps1 (which contains a close function as well to
get the the object and save it ) open allows the sheet to be loaded
into a package object without needing to export .
Updated .psm1 to add the formating and open/close ps1 files.
Fix Bug, AutoFilter with TableName create corrupted Excel file.
https://github.com/dfinke/ImportExcel/issues/65
You now cannot set AutoFilter and TableName at the same time.
"-Now" will not auto add AutoFilter if TableName set.
Added parameter ‘NoNumberConversion'
- Allows us to pass on data to Excel without trying to parse it as a
number
Some code clean-up:
- Removed repeating code by using functions
- Some syntax clean-up for better readability
- More clear verbose messages
- Improved error handling
Improved help
- Added parameter explanations
- Added more examples
Fixed handling of the TableName with parameter validation, we now throw
an error in case the TableName:
- starts with something else then a letter
- is NULL or empty
- Contains spaces
Just like in the orriginal EPPlus.dll library.
Added Try/Catch clause for the End clause. So errors like 'TableName is
not unique' are terminating errors and the function isn't exectued any
further.
Also cleaned up for readability some cosmetic stuff:
- 'if(' to 'if ('
- double quotes to single quotes where needed