mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-04 17:43:48 +00:00
Set-Format,row and column renamed; definitions as hashtables,
This commit is contained in:
@@ -51,14 +51,17 @@ Install-Module ImportExcel -scope CurrentUser
|
||||
```PowerShell
|
||||
Install-Module ImportExcel
|
||||
```
|
||||
- Lots of help improvements and some tidying up of examples
|
||||
- Lots of help improvements and some tidying up of example
|
||||
- Renamed Set-Column to Set-ExcelColum, Set-Row to Set-ExcelRow, and Set-Format, to Set-ExcelRange. Added aliases so the old names still work
|
||||
- Set-ExcelRange (or set-Format) used "Address" and "Range" incorrectly. There is now a single parameter "Range", with an alias of "Address" and the code beneath ensures that the function accepts a string specifying cells ("A1:Z10") or a range name; and worksheet. OR A named range, Or Table, or a tables's address, or part of the worksheet.cells collection.
|
||||
- Open-Excel Package and Add-Worksheet now add worksheets as script properties so if you do $Excel = open-excelpackage -path test.xlsx ; $excel.sheet1 ; it will return the sheet named sheet 1 Excel.sheetName is a script property which returns $this.workbook.worksheets["Sheetname"]
|
||||
- `Add-ConditionalFormatting`: Now wraps those strings in quotes when needed (for = <= >= string needs to be in double quotes). Parameter intellisense has been improved. There are new parameters: -StopIfTrue and -Priority and support for using the -Reverse parameter with Color-scale rules. Booleans in the sheet are now supported as the value for a condition. Also brought the two different kinds of condition together inside export-excel, and fixed a bug where named-ranges didn't work in some places. In `New-ConditionalText`, more types of conditional format are supported, and -ConditionalTextColor now has an argument completer
|
||||
- Improved handling of hyperlinks in `Export-Excel`.
|
||||
- `Export-Excel` has better checking of Table and PivotTable names (for uniqueness) and a new test in quick charts that there is suitable data for charting.
|
||||
- `Export-Excel` has better checking of Table and PivotTable names (for uniqueness) and a new test in quick charts that there is suitable data for charting. It also accepts hash tables for chart, pivot table and conditional formatting parameters which are splatted into the functions which add these.
|
||||
- Moved logic for adding a named range out of Export-Excel and into a new function named `Add-ExcelName`, and logic for adding a table into a function named `Add-ExcelTable`; this is to make it easier to do these things independently of Export-Excel, but minimize duplication. The Add-ExcelTable command has extra parameters to toggle the options from table tools toolbar (show totals etc) and set options in the totals row.
|
||||
- Moved PivotTable Functions out of Export-Excel.PS1 into their own file and moved Add-ExcelChart out of Export-Excel.ps1 into New-ExcelChart.ps1
|
||||
- Fixed issues where formatting could be reset when using Export-Excel to manipulate an existing sheet without appending data; this applied to number-formats and tables.
|
||||
- `Add-PivotTable` has some new parameters -PassThru returns the pivot table (e.g. to allow names /sort orders of data series to be tweaked ) -Address parameter allows Pivot to be placed on an existing sheet; -PivotTableStyle allows a change from "Medium6", -PivotNumberFormat sets data cells. Chart creation has been moved out to Add-ExcelChart, and -PivotChartDefinition allows a defintion created with New-ExcelChartDefinition to be used with a PivotTable. This opens up all the things that Add-ExcelChart can do without duplicating the parameters on Add-Pivot table and Export-Excel. Definition, TableStyle, Numberformat and ChartDefiniton can be used in `New-PivotTableDefinition` .
|
||||
- `Add-PivotTable` has some new parameters -PassThru returns the pivot table (e.g. to allow names /sort orders of data series to be tweaked ) -Address parameter allows Pivot to be placed on an existing sheet; -PivotTableStyle allows a change from "Medium6", -PivotNumberFormat formats data cells. It is more flexible about how the source data is specified. Chart creation has been moved out to Add-ExcelChart, and -PivotChartDefinition allows a defintion created with New-ExcelChartDefinition to be used with a PivotTable. This opens up all the things that Add-ExcelChart can do without duplicating the parameters on Add-Pivot table and Export-Excel. Definition, TableStyle, Numberformat and ChartDefiniton can be used in `New-PivotTableDefinition` .
|
||||
- `Add-ExcelChart` now supports -PassThru to return the chart for tweaking after creation; there is now a -PivotTable parameter to allow Add-PivotTable to call the code in Add-ExcelChart. And in `New-ExcelChartDefinition` Legend parameters (for size, bold & position ) are now supported
|
||||
- ChartDefinition and conditional formatting parameters can now be hashtables - if it would will splat into Add-ExcelChart or Add-ConditionalFormatting, it should be acceptable as a definition.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user