diff --git a/images/ChartTrendlines.png b/.gitbook/assets/ChartTrendlines.png similarity index 100% rename from images/ChartTrendlines.png rename to .gitbook/assets/ChartTrendlines.png diff --git a/images/ImproveNowDefaults.png b/.gitbook/assets/ImproveNowDefaults.png similarity index 100% rename from images/ImproveNowDefaults.png rename to .gitbook/assets/ImproveNowDefaults.png diff --git a/images/ScriptAnalyzerReport.png b/.gitbook/assets/ScriptAnalyzerReport.png similarity index 100% rename from images/ScriptAnalyzerReport.png rename to .gitbook/assets/ScriptAnalyzerReport.png diff --git a/images/Sparklines.png b/.gitbook/assets/Sparklines.png similarity index 100% rename from images/Sparklines.png rename to .gitbook/assets/Sparklines.png diff --git a/README.md b/README.md index f28dcf2..d16e401 100644 --- a/README.md +++ b/README.md @@ -1,31 +1,23 @@ -## Donation +# README + +### Donation If this project helped you reduce the time to get your job done, let me know. - [![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=UCSB9YVPFSNCY) ![](https://media.giphy.com/media/hpXxJ78YtpT0s/giphy.gif) -
+ [![](https://img.shields.io/powershellgallery/v/ImportExcel.svg)](https://www.powershellgallery.com/packages/ImportExcel) [![](https://img.shields.io/powershellgallery/dt/ImportExcel.svg)](https://www.powershellgallery.com/packages/ImportExcel) [![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://github.com/dfinke/ImportExcel/tree/70ab9e46c776e96fb287682d5b9b4b51a0ec3bac/LICENSE.txt) -

- - - -

+| CI System | Environment | Status | +| :--- | :--- | :--- | +| Azure DevOps | Windows | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=Windows)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | +| Azure DevOps | Windows \(Core\) | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=WindowsPSCore)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | +| Azure DevOps | Ubuntu | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=Ubuntu)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | +| Azure DevOps | macOS | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=macOS)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | -| CI System | Environment | Status | -|--------------|-------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| Azure DevOps | Windows | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=Windows)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | -| Azure DevOps | Windows (Core) | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=WindowsPSCore)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | -| Azure DevOps | Ubuntu | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=Ubuntu)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | -| Azure DevOps | macOS | [![Build Status](https://dougfinke.visualstudio.com/ImportExcel/_apis/build/status/dfinke.ImportExcel?branchName=master&jobName=macOS)](https://dougfinke.visualstudio.com/ImportExcel/_build/latest?definitionId=21&branchName=master) | - - - -PowerShell Import-Excel -- +PowerShell Import-Excel - Install from the [PowerShell Gallery](https://www.powershellgallery.com/packages/ImportExcel/). @@ -33,387 +25,396 @@ This PowerShell Module allows you to read and write Excel files without installi ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/testimonial.png) -# How to Videos +## How to Videos * [PowerShell Excel Module - ImportExcel](https://www.youtube.com/watch?v=fvKKdIzJCws&list=PL5uoqS92stXioZw-u-ze_NtvSo0k0K0kq) -Installation -- -#### [PowerShell V5](https://www.microsoft.com/en-us/download/details.aspx?id=50395) and Later +Installation - + +**PowerShell V5 and Later** + You can install the `ImportExcel` module directly from the PowerShell Gallery -* [Recommended] Install to your personal PowerShell Modules folder -```PowerShell -Install-Module ImportExcel -scope CurrentUser -``` -* [Requires Elevation] Install for Everyone (computer PowerShell Modules folder) -```PowerShell -Install-Module ImportExcel -``` +* \[Recommended\] Install to your personal PowerShell Modules folder -# Continuous Integration Updates + ```text + Install-Module ImportExcel -scope CurrentUser + ``` + +* \[Requires Elevation\] Install for Everyone \(computer PowerShell Modules folder\) + + ```text + Install-Module ImportExcel + ``` + +## Continuous Integration Updates Big thanks to [Illy](https://github.com/ili101) for taking the Azure DevOps CI to the next level. Improved badges, improved matrix for cross platform OS testing and more. Plus, wiring the [PowerShell ScriptAnalyzer Excel report](https://github.com/dfinke/ImportExcel/pull/590#issuecomment-488659081) we built into each run as an artifact. -![](./images/ScriptAnalyzerReport.png) +![](.gitbook/assets/ScriptAnalyzerReport.png) -# What's new 7.1.1 +## What's new 7.1.1 -- Merged [Nate Ferrell](https://github.com/scrthq)'s Linux fix. Thanks! -- Moved `Export-MultipleExcelSheets` from psm1 to Examples/Experimental -- Deleted the CI build in Appveyor -- Thank you [Mikey Bronowski](https://github.com/MikeyBronowski) for - - Multiple sweeps - - Standardising casing of parameter names, and variables - - Plus updating > 50 of the examples and making them consistent. +* Merged [Nate Ferrell](https://github.com/scrthq)'s Linux fix. Thanks! +* Moved `Export-MultipleExcelSheets` from psm1 to Examples/Experimental +* Deleted the CI build in Appveyor +* Thank you [Mikey Bronowski](https://github.com/MikeyBronowski) for + * Multiple sweeps + * Standardising casing of parameter names, and variables + * Plus updating > 50 of the examples and making them consistent. -# What's new 7.1.0 +## What's new 7.1.0 Fixes, Updates and new Examples -### Fixed +#### Fixed -- Odd behavior on the return of Import-Excel function https://github.com/dfinke/ImportExcel/issues/792 -- Export-Excel -FreezeTopRow with -Title https://github.com/dfinke/ImportExcel/issues/795 -- Not importing when first row contains a 0 in a column https://github.com/dfinke/ImportExcel/issues/802 +* Odd behavior on the return of Import-Excel function [https://github.com/dfinke/ImportExcel/issues/792](https://github.com/dfinke/ImportExcel/issues/792) +* Export-Excel -FreezeTopRow with -Title [https://github.com/dfinke/ImportExcel/issues/795](https://github.com/dfinke/ImportExcel/issues/795) +* Not importing when first row contains a 0 in a column [https://github.com/dfinke/ImportExcel/issues/802](https://github.com/dfinke/ImportExcel/issues/802) -### Updated +#### Updated -- Add `-AsDate` support to `Import-Excel` and `ConvertFrom-ExcelSheet` +* Add `-AsDate` support to `Import-Excel` and `ConvertFrom-ExcelSheet` -### New Examples +#### New Examples -|PS1|Description|Link| -|---|---|---| -|Pester-To-XLSx|Runs Pester, collects the results, enriches it, and exports it to Excel|[Pester-To-XLSx.ps1](https://github.com/dfinke/ImportExcel/blob/fe68ddbb0dd86e9fd1f3bfe01c4d2b9ce5509510/Examples/Pester-To-XLSx.ps1) -|DSUM|Sums up the numbers in a field (column) of records in a list or database that match conditions that you specify.|[DSUM.ps1](https://github.com/dfinke/ImportExcel/blob/12fa49e3142af2178ae1c6b18d8c757af0d629ac/Examples/ExcelBuiltIns/DSUM.ps1) -|VLookup|Setups up a sheet, you enter the name of an item and the amount is looked up|[VLOOKUP.ps1](https://github.com/dfinke/ImportExcel/blob/e42f42fde92ca636af22252b753a8329f48e15f1/Examples/ExcelBuiltIns/VLOOKUP.ps1) -# What's new 7.0.1 +| PS1 | Description | Link | +| :--- | :--- | :--- | +| Pester-To-XLSx | Runs Pester, collects the results, enriches it, and exports it to Excel | [Pester-To-XLSx.ps1](https://github.com/dfinke/ImportExcel/blob/fe68ddbb0dd86e9fd1f3bfe01c4d2b9ce5509510/Examples/Pester-To-XLSx.ps1) | +| DSUM | Sums up the numbers in a field \(column\) of records in a list or database that match conditions that you specify. | [DSUM.ps1](https://github.com/dfinke/ImportExcel/blob/12fa49e3142af2178ae1c6b18d8c757af0d629ac/Examples/ExcelBuiltIns/DSUM.ps1) | +| VLookup | Setups up a sheet, you enter the name of an item and the amount is looked up | [VLOOKUP.ps1](https://github.com/dfinke/ImportExcel/blob/e42f42fde92ca636af22252b753a8329f48e15f1/Examples/ExcelBuiltIns/VLOOKUP.ps1) | + +## What's new 7.0.1 More infrastructure improvements. -- Refine pipeline script analysis -- Improve artifacts published -- Add manifest (psd1) checks +* Refine pipeline script analysis +* Improve artifacts published +* Add manifest \(psd1\) checks -# What's new 7.0.0 -## Refactor +## What's new 7.0.0 -- Remove all functions from the `psm1` -- Move functions into public subdirectory -- Align TDD and continuous integration workflow for this refactor -- Move help from functions to mdHelp and use [PlatyPS](https://www.powershellgallery.com/packages/platyPS) to generate external help file +### Refactor + +* Remove all functions from the `psm1` +* Move functions into public subdirectory +* Align TDD and continuous integration workflow for this refactor +* Move help from functions to mdHelp and use [PlatyPS](https://www.powershellgallery.com/packages/platyPS) to generate external help file Thanks to [James O'Neill](https://twitter.com/jamesoneill) for the refactor and [Illy](https://twitter.com/ili_z) on the continuous integration. -# What's new 6.5.3 +## What's new 6.5.3 Thanks again to the community for making this module even better. -- [Fix import excel headers](https://github.com/dfinke/ImportExcel/pull/713) -- Numerous improvements for DataTables and exporting it to Excel [James O'Neill](https://twitter.com/jamesoneill) - - Names, styles, proper appending -- Handles marking the empty row on an empty table as dummy row -- Re-work code based on linting recommendations -- Update existing tests and add more -- Support PipelineVariable thanks to [Luc Dekens](https://twitter.com/LucD22) for reporting and [Ili](https://twitter.com/ili_z) for the PR -- Fix quoting in ConvertFromExcelToSQLInsert [beckerben](https://github.com/beckerben) +* [Fix import excel headers](https://github.com/dfinke/ImportExcel/pull/713) +* Numerous improvements for DataTables and exporting it to Excel [James O'Neill](https://twitter.com/jamesoneill) + * Names, styles, proper appending +* Handles marking the empty row on an empty table as dummy row +* Re-work code based on linting recommendations +* Update existing tests and add more +* Support PipelineVariable thanks to [Luc Dekens](https://twitter.com/LucD22) for reporting and [Ili](https://twitter.com/ili_z) for the PR +* Fix quoting in ConvertFromExcelToSQLInsert [beckerben](https://github.com/beckerben) -# What's new 6.5.2 +## What's new 6.5.2 Thank you [uSlackr](https://github.com/uSlackr)ill -- Fixes Column order issue (plus tests) for `Get-ExcelColumnName` + +* Fixes Column order issue \(plus tests\) for `Get-ExcelColumnName` Thank you [jhoneill](https://github.com/jhoneill) -- Added -Force to Send-SQLDataToExcel so it sends something even if no rows are returned. (see [#703](https://github.com/dfinke/ImportExcel/issues/703)) -- Added -asText to import-Excel see (#164)[https://github.com/dfinke/ImportExcel/issues/164] and multiple others -- Linux. Now set an environment variable if the support needed for Autosize is present, and use that Environment variable to decide to skip autosize operations. -- Fixed tests which needed autosize to work so they skip of the environment variable is set. -- Fixed another break where on azure the module never loaded. -- Add a comment to ci.ps1 re better .NET version detection and left some commented out code. + +* Added -Force to Send-SQLDataToExcel so it sends something even if no rows are returned. \(see [\#703](https://github.com/dfinke/ImportExcel/issues/703)\) +* Added -asText to import-Excel see \(\#164\)\[[https://github.com/dfinke/ImportExcel/issues/164](https://github.com/dfinke/ImportExcel/issues/164)\] and multiple others +* Linux. Now set an environment variable if the support needed for Autosize is present, and use that Environment variable to decide to skip autosize operations. +* Fixed tests which needed autosize to work so they skip of the environment variable is set. +* Fixed another break where on azure the module never loaded. +* Add a comment to ci.ps1 re better .NET version detection and left some commented out code. Other -- Added the example [ReadAllSheets.ps1](https://github.com/dfinke/ImportExcel/tree/master/Examples/ReadAllSheets) based on this thread https://github.com/dfinke/ImportExcel/issues/678 -# What's new 6.5.0 +* Added the example [ReadAllSheets.ps1](https://github.com/dfinke/ImportExcel/tree/master/Examples/ReadAllSheets) based on this thread [https://github.com/dfinke/ImportExcel/issues/678](https://github.com/dfinke/ImportExcel/issues/678) -This is now using the latest version of EPPlus. Unit tests are updated and passing, if you hit problems, please open an issue. -You can rollback to an older version from the PowerShell Gallery if you are blocked. +## What's new 6.5.0 -- Unit tests were updated and fixed -- "Set-WorksheetProtection" is now switched on -- Made a change to make Set-Excel range more friendly when Auto Sizing on non-windows platforms -- Fixed - Windows only tests don't attempt to run on non-windows systems -- Tests based on Get-Process don't attempt to run if <20 processes are returned -- If $env:TEMP is not set (as will be the case on Linux) -- Join-Path if used so paths are built with / or with \ as suits the OS where the test is running. -- Excel Sparklines now supported, check out the examples [SalesByQuarter](https://github.com/dfinke/ImportExcel/blob/master/Examples/Sparklines/SalesByQuarter.ps1) and [Sparklines](https://github.com/dfinke/ImportExcel/blob/master/Examples/Sparklines/Sparklines.ps1). +This is now using the latest version of EPPlus. Unit tests are updated and passing, if you hit problems, please open an issue. You can rollback to an older version from the PowerShell Gallery if you are blocked. -![](./images/Sparklines.png) +* Unit tests were updated and fixed +* "Set-WorksheetProtection" is now switched on +* Made a change to make Set-Excel range more friendly when Auto Sizing on non-windows platforms +* Fixed - Windows only tests don't attempt to run on non-windows systems +* Tests based on Get-Process don't attempt to run if <20 processes are returned +* If $env:TEMP is not set \(as will be the case on Linux\) +* Join-Path if used so paths are built with / or with as suits the OS where the test is running. +* Excel Sparklines now supported, check out the examples [SalesByQuarter](https://github.com/dfinke/ImportExcel/blob/master/Examples/Sparklines/SalesByQuarter.ps1) and [Sparklines](https://github.com/dfinke/ImportExcel/blob/master/Examples/Sparklines/Sparklines.ps1). +![](.gitbook/assets/Sparklines.png) -# What's new 6.2.4 +## What's new 6.2.4 Sensible parameter defaults, make your life easier and gets things done faster. -- Thank you to [DomRRuggeri](https://github.com/DomRRuggeri) for the initial Out-Excel PR and kicking off the conversation on the improvements. -- Thank you to [ili101](https://github.com/ili101) for refactoring and improving the defaults, and adding the tests for parameters. +* Thank you to [DomRRuggeri](https://github.com/DomRRuggeri) for the initial Out-Excel PR and kicking off the conversation on the improvements. +* Thank you to [ili101](https://github.com/ili101) for refactoring and improving the defaults, and adding the tests for parameters. +* Creates a table, with filtering +* Chooses a `TableStyle` +* Displays the Excel spreadsheet automatically -- Creates a table, with filtering -- Chooses a `TableStyle` -- Displays the Excel spreadsheet automatically - -```powershell +```text Get-Process | select Company, Name, Handles | Export-Excel ``` -![image](./images/ImproveNowDefaults.png) +![image](.gitbook/assets/ImproveNowDefaults.png) -# What's new 6.2.3 +## What's new 6.2.3 Thank you [jhoneill](https://github.com/jhoneill). -- Refactored copy sheet and added pipe support -- Add `ClearAll` to `Set-ExcelRange` -- Fix broken test & regression for `passwords` - - **Note**: Passwords do not work on `pwsh`. The EPPlus library does not support these dotnet core APIs at this time. +* Refactored copy sheet and added pipe support +* Add `ClearAll` to `Set-ExcelRange` +* Fix broken test & regression for `passwords` + * **Note**: Passwords do not work on `pwsh`. The EPPlus library does not support these dotnet core APIs at this time. -# What's new 6.2.2 +## What's new 6.2.2 -- Added requested feature, chart trendlines. - - [Example PowerShell script](https://github.com/dfinke/ImportExcel/blob/master/Examples/Charts/NumberOfVisitors.ps1) +* Added requested feature, chart trendlines. + * [Example PowerShell script](https://github.com/dfinke/ImportExcel/blob/master/Examples/Charts/NumberOfVisitors.ps1) -![](/images/ChartTrendlines.png) +![](.gitbook/assets/ChartTrendlines.png) -- Fixed Import-Excel and relative path issue, added unit tests. +* Fixed Import-Excel and relative path issue, added unit tests. + +## What's new 6.2.0 -# What's new 6.2.0 Thank you to [James O'Neill](https://github.com/jhoneill) -- Fixed, Import-Excel can read xlsx files even if already open in Excel -- Added `New-ExcelStyle`, plus `-Style` to `Export-Excel` and `-Merge` to `Set-ExcelRange` -- Added [Style Examples](https://github.com/dfinke/ImportExcel/tree/master/Examples/Styles) +* Fixed, Import-Excel can read xlsx files even if already open in Excel +* Added `New-ExcelStyle`, plus `-Style` to `Export-Excel` and `-Merge` to `Set-ExcelRange` +* Added [Style Examples](https://github.com/dfinke/ImportExcel/tree/master/Examples/Styles) ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/NewExcelStyle.png) -# What's new 6.1.0 +## What's new 6.1.0 Thank you to [James O'Neill](https://github.com/jhoneill) -- Instead of specifying a path provides an Excel Package object (from `Open-ExcelPackage`), using this avoids re-reading the whole file when importing multiple parts of it. To allow multiple read operations `Import-Excel` does NOT close the package, and you should use `Close-ExcelPackage -noSave` to close it. -# What's new 6.0.0 +* Instead of specifying a path provides an Excel Package object \(from `Open-ExcelPackage`\), using this avoids re-reading the whole file when importing multiple parts of it. To allow multiple read operations `Import-Excel` does NOT close the package, and you should use `Close-ExcelPackage -noSave` to close it. -Thank you to [James O'Neill](https://github.com/jhoneill) for the optimizations, and refactoring leading to a ***~10x*** speed increase. Thanks to [ili101](https://github.com/ili101) for earlier PRs that provided the ground work for this. +## What's new 6.0.0 -* Performance improvement to `Export-Excel` see [#506](https://github.com/dfinke/ImportExcel/issues/506) and [#555](https://github.com/dfinke/ImportExcel/issues/555). This has meant taking code in Add-CellValue back into process block of `Export-Excel`, as the overhead of calling the function was a lot greater than time executing the code inside it. [Blog post to follow](https://jamesone111.wordpress.com/). Some tests are showing a ***~10x*** speed increase. [#572](https://github.com/dfinke/ImportExcel/issues/572) was about a broken #region tag in this part of the code and that has been cleaned up in the process. +Thank you to [James O'Neill](https://github.com/jhoneill) for the optimizations, and refactoring leading to a _**~10x**_ speed increase. Thanks to [ili101](https://github.com/ili101) for earlier PRs that provided the ground work for this. -* `Export-Excel` now has an -InputObject parameter (this was previously -TargetData , which is now an alias for InputObject). -If the `inputobject` is an array, each item will be inserted, so you can run `export-excel -inputobject $x` rather than `$x | Export-Excel`, and if it is a `system.data.datatable` object it will be inserted directly rather than cell-by-cell. `Send-SQLDataToExcel` takes advantage of this new functionality. There are simple tests for these new items +* Performance improvement to `Export-Excel` see [\#506](https://github.com/dfinke/ImportExcel/issues/506) and [\#555](https://github.com/dfinke/ImportExcel/issues/555). This has meant taking code in Add-CellValue back into process block of `Export-Excel`, as the overhead of calling the function was a lot greater than time executing the code inside it. [Blog post to follow](https://jamesone111.wordpress.com/). Some tests are showing a _**~10x**_ speed increase. [\#572](https://github.com/dfinke/ImportExcel/issues/572) was about a broken \#region tag in this part of the code and that has been cleaned up in the process. +* `Export-Excel` now has an -InputObject parameter \(this was previously -TargetData , which is now an alias for InputObject\). If the `inputobject` is an array, each item will be inserted, so you can run `export-excel -inputobject $x` rather than `$x | Export-Excel`, and if it is a `system.data.datatable` object it will be inserted directly rather than cell-by-cell. `Send-SQLDataToExcel` takes advantage of this new functionality. There are simple tests for these new items +* `Export-Excel` previously assumed `-Now` if there were no other parameters, it will now assume `-Now` if there is no `-Path` or `-ExcelPackage`. The .PSD1 file now itemizes the items exported by the module [\#557](https://github.com/dfinke/ImportExcel/issues/557) -* `Export-Excel` previously assumed `-Now` if there were no other parameters, it will now assume `-Now` if there is no `-Path` or `-ExcelPackage`. -The .PSD1 file now itemizes the items exported by the module [#557](https://github.com/dfinke/ImportExcel/issues/557) - -# What's new 5.4.5 +## What's new 5.4.5 Thank you to [James O'Neill](https://github.com/jhoneill) for the great additions. -- Modified Send-SQLDataToExcel so it creates tables and ranges itself; previously it relied on export-excel to do this which cause problems when adding data to an existing sheet (#555) -- Added new command Add-ExcelDataValidation which will apply different data-validation rules to ranges of cells -- Changed the export behavior so that (1) attempts to convert to a number only apply if the the value was a string; (2) Nulls are no longer converted to an empty string (3) there is a specific check for URIs and not just text which is a valid URI. Using UNC names in hyperlinks remains problematic. -- Changed the behavior of AutoSize in export excel so it only applies to the exported columns. Previously if something was exported next to pre-existing data, AutoSize would resize the whole sheet, potentially undoing things which had been set on the earlier data. If anyone relied on this behavior they will need to explicitly tell the sheet to auto size with $sheet.cells.autofitColumns. (where $sheet points to the sheet, it might be $ExcelPackage.Workbook.Worksheets['Name']) -- In Compare-Worksheet,the Key for comparing the sheets can now be written as a hash table with an expression - it is used with a Group-Object command so if it is valid in Group-Object it should be accepted; this allows the creation of composite keys when data being compared doesn't have a column which uniquely identifies rows. -- In Set-ExcelRange , added a 'Locked' option equivalent to the checkbox on the Protection Tab of the format cells dialog box in Excel. -- Created a Set-WorksheetProtection function. This gives the same options the protection dialog in Excel but is 0.9 release at the moment. +* Modified Send-SQLDataToExcel so it creates tables and ranges itself; previously it relied on export-excel to do this which cause problems when adding data to an existing sheet \(\#555\) +* Added new command Add-ExcelDataValidation which will apply different data-validation rules to ranges of cells +* Changed the export behavior so that \(1\) attempts to convert to a number only apply if the the value was a string; \(2\) Nulls are no longer converted to an empty string \(3\) there is a specific check for URIs and not just text which is a valid URI. Using UNC names in hyperlinks remains problematic. +* Changed the behavior of AutoSize in export excel so it only applies to the exported columns. Previously if something was exported next to pre-existing data, AutoSize would resize the whole sheet, potentially undoing things which had been set on the earlier data. If anyone relied on this behavior they will need to explicitly tell the sheet to auto size with $sheet.cells.autofitColumns. \(where $sheet points to the sheet, it might be $ExcelPackage.Workbook.Worksheets\['Name'\]\) +* In Compare-Worksheet,the Key for comparing the sheets can now be written as a hash table with an expression - it is used with a Group-Object command so if it is valid in Group-Object it should be accepted; this allows the creation of composite keys when data being compared doesn't have a column which uniquely identifies rows. +* In Set-ExcelRange , added a 'Locked' option equivalent to the checkbox on the Protection Tab of the format cells dialog box in Excel. +* Created a Set-WorksheetProtection function. This gives the same options the protection dialog in Excel but is 0.9 release at the moment. -## New Example +### New Example -- Added [MutipleValidations.ps1](https://github.com/dfinke/ImportExcel/blob/master/Examples/ExcelDataValidation/MutipleValidations.ps1). Culled from the `tests`. +* Added [MutipleValidations.ps1](https://github.com/dfinke/ImportExcel/blob/master/Examples/ExcelDataValidation/MutipleValidations.ps1). Culled from the `tests`. -# What's new 5.4.4 +## What's new 5.4.4 -- Fix issue when only a single property is piped into Export-Excel -- Fix issue in `Copy-ExcelWorksheet`, close the `$Stream` +* Fix issue when only a single property is piped into Export-Excel +* Fix issue in `Copy-ExcelWorksheet`, close the `$Stream` -# What's new 5.4.3 +## What's new 5.4.3 -- Added Remove-Worksheet: Removes one or more worksheets from one or more workbooks +* Added Remove-Worksheet: Removes one or more worksheets from one or more workbooks -# What's new 5.4.2 +## What's new 5.4.2 + +* Added parameters -GroupDateRow and -GroupDatePart & -GroupNumericRow, -GroupNumericMin, -GroupNumericMax and -GroupNumericInterval -- Added parameters -GroupDateRow and -GroupDatePart & -GroupNumericRow, -GroupNumericMin, -GroupNumericMax and -GroupNumericInterval to Add-PivotTable and New-PivotTableDefinition. The date ones gather dates of the same year and/or quarter and/or month and/or day etc. + the number ones group numbers into bands, starting at Min, and going up steps specified by Interval. Added tests and help for these. -- Set-ExcelRow and Set-ExcelColumn now check that the worksheet name they passed exists in the workbook. + +* Set-ExcelRow and Set-ExcelColumn now check that the worksheet name they passed exists in the workbook. ![](https://raw.githubusercontent.com/dfinke/ImportExcel/cf964e3e4f761ca4058c4a4b809e2206b16709da/images/GroupingNumeric.png) -# What's new 5.4.0 +## What's new 5.4.0 -- Thank you to Conrad Agramont, Twitter: [@AGramont](https://twitter.com/@AGramont) for the `AddMultiWorkSheet.ps1` example. Much appreciated! -- Fixed several more bugs where parameters were ignored if passed a zero value -- Fixed bug where chart series headers could not come form a cell reference (=Sheet1!Z10 now works as a header reference) -- Add-Chart will now allow a single X range, or as many X ranges as there are Y ranges. -- Merge-MultipleSheets is more robust. -- Set-ExcelRow and Set-ExcelColumn trap attempts to process a sheet with no rows/columns. -- Help has been proof-read (thanks to Mrs. @Jhoneill !). +* Thank you to Conrad Agramont, Twitter: [@AGramont](https://twitter.com/@AGramont) for the `AddMultiWorkSheet.ps1` example. Much appreciated! +* Fixed several more bugs where parameters were ignored if passed a zero value +* Fixed bug where chart series headers could not come form a cell reference \(=Sheet1!Z10 now works as a header reference\) +* Add-Chart will now allow a single X range, or as many X ranges as there are Y ranges. +* Merge-MultipleSheets is more robust. +* Set-ExcelRow and Set-ExcelColumn trap attempts to process a sheet with no rows/columns. +* Help has been proof-read \(thanks to Mrs. @Jhoneill !\). -# What's new 5.3.4 +## What's new 5.3.4 -- HotFix for parameter PivotTableStyle should be PivotTableStyle https://github.com/dfinke/ImportExcel/issues/453 +* HotFix for parameter PivotTableStyle should be PivotTableStyle [https://github.com/dfinke/ImportExcel/issues/453](https://github.com/dfinke/ImportExcel/issues/453) -# What's new 5.3.3 +## What's new 5.3.3 -- Thank you to (lazywinadmin)[https://github.com/lazywinadmin] - Expand aliases in examples and elsewhere -- In Export-Excel fixed a bug where -AutoNameRange on pre-existing data included the header in the range. -- In Export-Excel fixed a bug which caused a zero, null, or empty string in a list of simple objects to be skipped. -- In Export-Excel improved the behaviour when a new worksheet is created without data, and Tables etc are added to it. -- In Join-Worksheet: added argument completer to -TitleBackgroundColor and set default for -TitleBackgroundStyle to 'Solid'. -- In Add-Excel chart, New-ExcelChart, tests and Examples fixed mis-spelling of "Position" -- In Send-SqlDataToExcel: improved robustness of check for no data returned. -- In Set-ExcelColumn: -column can come from the pipeline (supporting an array introduces complications for supporting script blocks); -AutoNameRange no longer requires heading to specified (so you can do 1..10 | Set-ExcelColumn -AutoNameRange ); In Set-ExcelRow: -Row can come from the pipeline -- Improved test coverage (back over 80%). -- Help and example improvements. In "Index - music.ps1" the module for querying the index can be downloaded from PowerShell gallery #requires set to demand it. In SQL+FillColumns+Pivot\example2.ps1 the GetSQL module can be downloaded and #Requires has been set. The F1 results spreadsheet is available from one drive and a link is provided. +* Thank you to \(lazywinadmin\)\[[https://github.com/lazywinadmin](https://github.com/lazywinadmin)\] - Expand aliases in examples and elsewhere +* In Export-Excel fixed a bug where -AutoNameRange on pre-existing data included the header in the range. +* In Export-Excel fixed a bug which caused a zero, null, or empty string in a list of simple objects to be skipped. +* In Export-Excel improved the behaviour when a new worksheet is created without data, and Tables etc are added to it. +* In Join-Worksheet: added argument completer to -TitleBackgroundColor and set default for -TitleBackgroundStyle to 'Solid'. +* In Add-Excel chart, New-ExcelChart, tests and Examples fixed mis-spelling of "Position" +* In Send-SqlDataToExcel: improved robustness of check for no data returned. +* In Set-ExcelColumn: -column can come from the pipeline \(supporting an array introduces complications for supporting script blocks\); -AutoNameRange no longer requires heading to specified \(so you can do 1..10 \| Set-ExcelColumn -AutoNameRange \); In Set-ExcelRow: -Row can come from the pipeline +* Improved test coverage \(back over 80%\). +* Help and example improvements. In "Index - music.ps1" the module for querying the index can be downloaded from PowerShell gallery \#requires set to demand it. In SQL+FillColumns+Pivot\example2.ps1 the GetSQL module can be downloaded and \#Requires has been set. The F1 results spreadsheet is available from one drive and a link is provided. +* Added Azure DevOps continuous integration and badges -- Added Azure DevOps continuous integration and badges +## What's new in Release 5.3 +* Help improvements and tidying up of examples and extra examples +* Open-Excel Package and Add-Worksheet now add worksheets as script properties so `$Excel = Open-ExcelPackage -path test.xlsx ; $excel.sheet1` will return the sheet named "sheet1" `$Excel.SheetName` is a script property which is defined as `$this.workbook.worksheets["Sheetname"]` +* Renamed Set-Column to `Set-ExcelColumn`, 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". If the worksheet parameter is present, the function accepts a string specifying cells \("A1:Z10"\) or a the name of range. Without the worksheet it accepts an object representing a named range or a Table; or a tables's address, or part of the worksheet.cells collection. +* `Add-ConditionalFormatting`: Used "address" correctly, and it will accept ranges in the address parameter \(range is now an alias for address\). It now wraps conditional value strings in quotes when needed \(for = <= >= operations string needs to be in double quotes see issue \#424\). Parameter intellisense has been improved. There are new parameters: `-StopIfTrue` and `-Priority` and support for using the `-Reverse` parameter with Color-scale rules \(issue \#430\). 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 the argument completer for -ConditionalTextColor was missing and has been added. +* Improved handling of hyperlinks in `Export-Excel` \(see issue \#426\)s +* `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 bug in Merge-MultipleSheets where background pattern was set to None, making background color invisible. +* 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` 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 - copying the range options in Set-ExcelRange. `Add-ExcelChart` is now used for creating PivotCharts, and `-PivotChartDefinition` allows a definition created with `New-ExcelChartDefinition` to be used when setting up 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 - anything that splats Add-ExcelChart or Add-ConditionalFormatting, it should be acceptable as a definition. +## What's new in Release 5.2 -# What's new in Release 5.3 +* Value does not need to be mandatory in Set-Row or Set-Column, also tidied their parameters a little. +* Added support for array formulas in Set-Format \(it really should be set range now that it sets values, formulas and hyperlinks - that can go on the to-do list \) +* Fixed a bug with -Append in Export-Excel which caused it to overwrite the last row if the new data was a simple type. +* NumberFormat in Export-Excel now sets the default for on a new / blank sheet; but \[still\] sets individual cells when adding to a sheet +* Added support for timespans in Export excel ; set as elapsed hours, mins, secs \[h\]:mm:sss +* In Export-Excel improved the catch-all handler for insuring values to cope better with nested objects \(\#419\) and reduce the number of parse operations +* Added -Calculate switch to Export-Excel and Close-Excel Package; EPPlus needs formulas to OMIT the leading = sign so where formula is set it now strips a leading = sign +* Added -PivotTotals parameter where there was already -NoTotalsInPivot new one allows None, Both, Rows, Columns. \(\#415\) +* When appending Export-Excel only extended tables and ranges if they were explicitly specified. It now does it automatically. +* Compare and Merge worksheet originally had a problem with > 26 columns, I fixed merge turns out I hadn't fixed compare ... I have now +* Fixed bug where Export-Excel would not recognize it had to set $TitleFillPattern - made the default 'Solid' +* ExcludeProperty in Export-Excel now supports wildcards. +* Added DateTime to the list of types which can be exported as single column. +* Added Password support to Open- and Close-ExcelPackage \(password was not doing anything in Export-Excel\) +* Gave Expand-NumberFormat a better grasp of currency layouts - it follows .NET which is not always the same as Excel would set:-\( -- Help improvements and tidying up of examples and extra examples -- Open-Excel Package and Add-Worksheet now add worksheets as script properties so `$Excel = Open-ExcelPackage -path test.xlsx ; $excel.sheet1` will return the sheet named "sheet1" `$Excel.SheetName` is a script property which is defined as `$this.workbook.worksheets["Sheetname"]` -- Renamed Set-Column to `Set-ExcelColumn`, 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". If the worksheet parameter is present, the function accepts a string specifying cells ("A1:Z10") or a the name of range. Without the worksheet it accepts an object representing a named range or a Table; or a tables's address, or part of the worksheet.cells collection. -- `Add-ConditionalFormatting`: Used "address" correctly, and it will accept ranges in the address parameter (range is now an alias for address). It now wraps conditional value strings in quotes when needed (for = <= >= operations string needs to be in double quotes see issue #424). Parameter intellisense has been improved. There are new parameters: `-StopIfTrue` and `-Priority` and support for using the `-Reverse` parameter with Color-scale rules (issue #430). 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 the argument completer for -ConditionalTextColor was missing and has been added. -- Improved handling of hyperlinks in `Export-Excel` (see issue #426)s -- `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 bug in Merge-MultipleSheets where background pattern was set to None, making background color invisible. -- 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` 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 - copying the range options in Set-ExcelRange. `Add-ExcelChart` is now used for creating PivotCharts, and `-PivotChartDefinition` allows a definition created with `New-ExcelChartDefinition` to be used when setting up 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 - anything that splats Add-ExcelChart or Add-ConditionalFormatting, it should be acceptable as a definition. +## What's new in Release 5.1.1 +* Set-Row and Set-Column will now create hyperlinks and insert dates correctly +* Import-Excel now has an argument completer for Worksheet name - this can be slow on large files +* The NumberFormat parameter \(in Export-Excel, Set-Row, Set-Column, Set-Format and Add-ConditionalFormat\) and X&YAxisNumberFormat parameters \(in New-ExcelChartDefinition and Add-ExcelChart\) now have an argument completer and the names Currency, Number, Percentage, Scientific, Fraction, Short Date ,Short time,Long time, Date-Time and Text will be converted to the correct Excel formatting strings. +* Added new function Select-Worksheet to make a named sheet active: Added -Activate switch to Add-Worksheet, to make current sheet active, Export-Excel and Add-PivotTable support -Activate and pass it to Add-Worksheet, and New-PivotTableDefinition allows it to be part of the Pivot TableDefinition. +* Fixed a bug in Set-Format which caused -Hidden not to work +* Made the same changes to Add-Conditional format as set format so -switch:$false is processed, and 0 enums and values are processed correctly +* In Export-Excel, wrapped calls to Add-CellValue in a try catch so a value which causes an issue doesn't crash the whole export but generates a warning instead \(\#410\) . +* Additional tests. -# What's new in Release 5.2 -- Value does not need to be mandatory in Set-Row or Set-Column, also tidied their parameters a little. -- Added support for array formulas in Set-Format (it really should be set range now that it sets values, formulas and hyperlinks - that can go on the to-do list ) -- Fixed a bug with -Append in Export-Excel which caused it to overwrite the last row if the new data was a simple type. -- NumberFormat in Export-Excel now sets the default for on a new / blank sheet; but [still] sets individual cells when adding to a sheet -- Added support for timespans in Export excel ; set as elapsed hours, mins, secs [h]:mm:sss -- In Export-Excel improved the catch-all handler for insuring values to cope better with nested objects (#419) and reduce the number of parse operations -- Added -Calculate switch to Export-Excel and Close-Excel Package; EPPlus needs formulas to OMIT the leading = sign so where formula is set it now strips a leading = sign -- Added -PivotTotals parameter where there was already -NoTotalsInPivot new one allows None, Both, Rows, Columns. (#415) -- When appending Export-Excel only extended tables and ranges if they were explicitly specified. It now does it automatically. -- Compare and Merge worksheet originally had a problem with > 26 columns, I fixed merge turns out I hadn't fixed compare ... I have now -- Fixed bug where Export-Excel would not recognize it had to set $TitleFillPattern - made the default 'Solid' -- ExcludeProperty in Export-Excel now supports wildcards. -- Added DateTime to the list of types which can be exported as single column. -- Added Password support to Open- and Close-ExcelPackage (password was not doing anything in Export-Excel) -- Gave Expand-NumberFormat a better grasp of currency layouts - it follows .NET which is not always the same as Excel would set:-( +## What's new to July 18 -# What's new in Release 5.1.1 -- Set-Row and Set-Column will now create hyperlinks and insert dates correctly -- Import-Excel now has an argument completer for Worksheet name - this can be slow on large files -- The NumberFormat parameter (in Export-Excel, Set-Row, Set-Column, Set-Format and Add-ConditionalFormat) and X&YAxisNumberFormat parameters (in New-ExcelChartDefinition and Add-ExcelChart) now have an argument completer and the names Currency, Number, Percentage, Scientific, Fraction, Short Date ,Short time,Long time, Date-Time and Text will be converted to the correct Excel formatting strings. -- Added new function Select-Worksheet to make a named sheet active: Added -Activate switch to Add-Worksheet, to make current sheet active, Export-Excel and Add-PivotTable support -Activate and pass it to Add-Worksheet, and New-PivotTableDefinition allows it to be part of the Pivot TableDefinition. -- Fixed a bug in Set-Format which caused -Hidden not to work -- Made the same changes to Add-Conditional format as set format so -switch:$false is processed, and 0 enums and values are processed correctly -- In Export-Excel, wrapped calls to Add-CellValue in a try catch so a value which causes an issue doesn't crash the whole export but generates a warning instead (#410) . -- Additional tests. +* Changed parameter evaluation in Set-Format to support -bold:$false \(and other switches so that if false is specified the attribute will be removed \), and to bug were enums with a value of zero, and other zero parameters were not set. +* Moved chart creation into its own function \(Add-Excel chart\) within Export-Excel.ps1. Renamed New-Excelchart to New-ExcelChartDefinition to make it clearer that it is not making anything in the workbook \(but for compatibility put an alias of New-ExcelChart in so existing code does not break\). Found that -Header does nothing, so it isn't Add-Excel chart and there is a message that does nothing in New-ExcelChartDefinition . +* Added -BarChart -ColumnChart -LineChart -PieChart parameters to Export-Excel for quick charts without giving a full chart definition. +* Added parameters for managing chart Axes and legend +* Added some chart tests to Export-Excel.tests.ps1. \(but tests & examples for quick charts , axes or legends still on the to do list \) +* Fixed some bad code which had been checked-in in-error and caused adding charts to break. \(This was not seen outside GitHub \#377\) +* Added "Reverse" parameter to Add-ConditionalFormatting ; and added -PassThru to make it easier to modify details of conditional formatting rules after creation \(\#396\) +* Refactored ConditionalFormatting code in Export excel to use Add-ConditionalFormatting. +* Rewrote Copy-ExcelWorksheet to use copy functionality rather than import \| export \(395\) +* Found sorts could be inconsistent in Merge-MultipleWorksheet, so now sort on more columns. +* Fixed a bug introduced into Compare-Worksheet by the change described in the June changes below, this meant the font color was only being set in one sheet, when a row was changed. Also found that the PowerShell ISE and shell return Compare-Object results in different sequences which broke some tests. Applied a sort to ensure things are in a predictable order. \(\#375\) +* Removed \(2\) calls to Get-ExcelColumnName \(Removed and then restored function itself\) +* Fixed an issue in Export-Excel where formulas were inserted as strings if "NoNumberConversion" is applied \(\#374\), and made sure formatting is applied to formula cells +* Fixed an issue with parameter sets in Export-Excel not being determined correctly in some cases \(I think this had been resolved before and might have regressed\) +* Reverted the \[double\]::tryParse in export excel to the previous \(longer\) way, as the shorter way was not behaving correctly with with the number formats in certain regions. \(also \#374\) +* Changed Table, Range and AutoRangeNames to apply to whole data area if no data has been inserted OR to inserted data only if it has.\(\#376\) This means that if there are multiple inserts only inserted data is touched, rather than going as far down and/or right as the furthest used cell. Added a test for this. +* Added more of the Parameters from Export-Excel to Join-worksheet, join just calls export-excel with these parameters so there is no code behind them \(\#383\) +* Added more of the Parameters from Export-Excel to Send-SQLDataToExcel, send just calls export-excel with these parameters... +* Added support for passing a System.Data.DataTable directly to Send-SQLDataToExcel +* Fixed a bug in Merge-MultipleSheets where if the key was "name", columns like "displayName" would not be processed correctly, nor would names like "something\_ROW". Added tests for Compare, Merge and Join Worksheet +* Add-Worksheet , fixed a regression with move-after \(\#392\), changed way default worksheet name is decided, so if none is specified, and an existing worksheet is copied \(see June additions\) and the name doesn't already exist, the original sheet name will be kept. \(\#393\) If no name is given an a blank sheet is created, then it will be named sheetX where X is the number of the sheet \(so if you have sheets FOO and BAR the new sheet will be Sheet3\). -# What's new to July 18 -- Changed parameter evaluation in Set-Format to support -bold:$false (and other switches so that if false is specified the attribute will be removed ), and to bug were enums with a value of zero, and other zero parameters were not set. -- Moved chart creation into its own function (Add-Excel chart) within Export-Excel.ps1. Renamed New-Excelchart to New-ExcelChartDefinition to make it clearer that it is not making anything in the workbook (but for compatibility put an alias of New-ExcelChart in so existing code does not break). Found that -Header does nothing, so it isn't Add-Excel chart and there is a message that does nothing in New-ExcelChartDefinition . -- Added -BarChart -ColumnChart -LineChart -PieChart parameters to Export-Excel for quick charts without giving a full chart definition. -- Added parameters for managing chart Axes and legend -- Added some chart tests to Export-Excel.tests.ps1. (but tests & examples for quick charts , axes or legends still on the to do list ) -- Fixed some bad code which had been checked-in in-error and caused adding charts to break. (This was not seen outside GitHub #377) -- Added "Reverse" parameter to Add-ConditionalFormatting ; and added -PassThru to make it easier to modify details of conditional formatting rules after creation (#396) -- Refactored ConditionalFormatting code in Export excel to use Add-ConditionalFormatting. -- Rewrote Copy-ExcelWorksheet to use copy functionality rather than import | export (395) -- Found sorts could be inconsistent in Merge-MultipleWorksheet, so now sort on more columns. -- Fixed a bug introduced into Compare-Worksheet by the change described in the June changes below, this meant the font color was only being set in one sheet, when a row was changed. Also found that the PowerShell ISE and shell return Compare-Object results in different sequences which broke some tests. Applied a sort to ensure things are in a predictable order. (#375) -- Removed (2) calls to Get-ExcelColumnName (Removed and then restored function itself) -- Fixed an issue in Export-Excel where formulas were inserted as strings if "NoNumberConversion" is applied (#374), and made sure formatting is applied to formula cells -- Fixed an issue with parameter sets in Export-Excel not being determined correctly in some cases (I think this had been resolved before and might have regressed) -- Reverted the [double]::tryParse in export excel to the previous (longer) way, as the shorter way was not behaving correctly with with the number formats in certain regions. (also #374) -- Changed Table, Range and AutoRangeNames to apply to whole data area if no data has been inserted OR to inserted data only if it has.(#376) This means that if there are multiple inserts only inserted data is touched, rather than going as far down and/or right as the furthest used cell. Added a test for this. -- Added more of the Parameters from Export-Excel to Join-worksheet, join just calls export-excel with these parameters so there is no code behind them (#383) -- Added more of the Parameters from Export-Excel to Send-SQLDataToExcel, send just calls export-excel with these parameters... -- Added support for passing a System.Data.DataTable directly to Send-SQLDataToExcel -- Fixed a bug in Merge-MultipleSheets where if the key was "name", columns like "displayName" would not be processed correctly, nor would names like "something_ROW". Added tests for Compare, Merge and Join Worksheet -- Add-Worksheet , fixed a regression with move-after (#392), changed way default worksheet name is decided, so if none is specified, and an existing worksheet is copied (see June additions) and the name doesn't already exist, the original sheet name will be kept. (#393) If no name is given an a blank sheet is created, then it will be named sheetX where X is the number of the sheet (so if you have sheets FOO and BAR the new sheet will be Sheet3). +## New in June 18 + +* 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, the only code change is to fix a bug if two worksheets have different names, are in different files and the Comparison sends the delta in the second back before the one in first, then highlighting changed properties could throw an error. Correcting the spelling of Merge-MultipleSheets is potentially a breaking change \(and it is still plural!\) -# New in June 18 -- 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, the only code change is to fix a bug if two worksheets have different names, are in different files and the Comparison sends the delta in the second back before the one in first, then highlighting changed properties could throw an error. 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 ---- + * `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 +* [James O'Neill](https://twitter.com/jamesoneill) added `Compare-Worksheet` + * Compares two worksheets with the same name in different files. +**4/22/2018** -- [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 -- [ili101](https://github.com/ili101) for fixes and features - - Removed `[PSPlot]` as OutputType. Fixes it throwing an error -- [Nasir Zubair](https://github.com/nzubair) added `ConvertEmptyStringsToNull` to the function `ConvertFrom-ExcelToSQLInsert` - - If specified, cells without any data are replaced with NULL, instead of an empty string. This is to address behaviors in certain DBMS where an empty string is insert as 0 for INT column, instead of a NULL value. +* [ili101](https://github.com/ili101) for fixes and features + * Removed `[PSPlot]` as OutputType. Fixes it throwing an error +* [Nasir Zubair](https://github.com/nzubair) added `ConvertEmptyStringsToNull` to the function `ConvertFrom-ExcelToSQLInsert` + * If specified, cells without any data are replaced with NULL, instead of an empty string. This is to address behaviors in certain DBMS where an empty string is insert as 0 for INT column, instead of a NULL value. + +**4/10/2018** -#### 4/10/2018 -New parameter `-ReZip`. It ReZips the xlsx so it can be imported to PowerBI Thanks to [Justin Grote](https://github.com/JustinGrote) for finding and fixing the error that Excel files created do not import to PowerBI online. Plus, thank you to [CrashM](https://github.com/CrashM) for confirming the fix. Super helpful! -#### 3/31/2018 -- Updated `Set-Format` - * Added parameters to set borders for cells, including top, bottom, left and right - * Added parameters to set `value` and `formula` +**3/31/2018** -```powershell +* Updated `Set-Format` + * Added parameters to set borders for cells, including top, bottom, left and right + * Added parameters to set `value` and `formula` + +```text $data = @" From,To,RDollars,RPercent,MDollars,MPercent,Revenue,Margin Atlanta,New York,3602000,.0809,955000,.09,245,65 @@ -427,10 +428,9 @@ New York,Phoneix,2782000,.0723,467000,.10,674,33 ![](https://github.com/dfinke/ImportExcel/blob/master/images/CustomReport.png?raw=true) +* Added `-PivotFilter` parameter, allows you to set up a filter so you can drill down into a subset of the overall dataset. -- Added `-PivotFilter` parameter, allows you to set up a filter so you can drill down into a subset of the overall dataset. - -```powershell +```text $data =@" Region,Area,Product,Units,Cost North,A1,Apple,100,.5 @@ -444,21 +444,22 @@ North,A1,Grape,140,2.5 ![](https://github.com/dfinke/ImportExcel/blob/master/images/PivotTableFilter.png?raw=true) +**3/14/2018** -#### 3/14/2018 -- Thank you to [James O'Neill](https://twitter.com/jamesoneill), fixed bugs with ChangeDatabase parameter which would prevent it working - -#### +* Thank you to [James O'Neill](https://twitter.com/jamesoneill), fixed bugs with ChangeDatabase parameter which would prevent it working * Added -Force to New-Alias * Add example to set the background color of a column * Supports excluding Row Grand Totals for PivotTables * Allow xlsm files to be read * Fix `Set-Column.ps1`, `Set-Row.ps1`, `SetFormat.ps1`, `formatting.ps1` **$false** and **$BorderRound** -#### 1/1/2018 -* Added switch `[Switch]$NoTotalsInPivot`. Allows hiding of the row totals in the pivot table. -Thanks you to [jameseholt](https://github.com/jameseholt) for the request. -```powershell + **1/1/2018** + +* Added switch `[Switch]$NoTotalsInPivot`. Allows hiding of the row totals in the pivot table. + + Thanks you to [jameseholt](https://github.com/jameseholt) for the request. + +```text get-process | where Company | select Company, Handles, WorkingSet | export-excel C:\temp\testColumnGrand.xlsx ` -Show -ClearSheet -KillExcel ` @@ -468,7 +469,8 @@ Thanks you to [jameseholt](https://github.com/jameseholt) for the request. * Fixed when using certain a `ChartType` for the Pivot Table Chart, would throw an error * Fixed - when you specify a file, and the directory does not exit, it now creates it -#### 11/23/2017 +**11/23/2017** + More great additions and thanks to [James O'Neill](https://twitter.com/jamesoneill) * Added `Convert-XlRangeToImage` Gets the specified part of an Excel file and exports it as an image @@ -481,22 +483,22 @@ More great additions and thanks to [James O'Neill](https://twitter.com/jamesonei * Added Set-Row and Set-Column - fill a formula down or across. * Added Send-SQLDataToExcel. Insert a rowset and then call Export-Excel for ranges, charts, pivots etc. -#### 10/30/2017 +**10/30/2017** + Huge thanks to [James O'Neill](https://twitter.com/jamesoneill). PowerShell aficionado. He always brings a flare when working with PowerShell. This is no exception. -(Check out the examples `help Export-Excel -Examples`) +\(Check out the examples `help Export-Excel -Examples`\) * New parameter `Package` allows an ExcelPackage object returned by `-passThru` to be passed in * New parameter `ExcludeProperty` to remove unwanted properties without needing to go through `select-object` * New parameter `Append` code to read the existing headers and move the insertion point below the current data -* New parameter `ClearSheet` which removes the worksheet and any past data - -* Remove any existing Pivot table before trying to [re]create it +* New parameter `ClearSheet` which removes the worksheet and any past data +* Remove any existing Pivot table before trying to \[re\]create it * Check for inserting a pivot table so if `-InsertPivotChart` is specified it implies `-InsertPivotTable` -(Check out the examples `help Export-Excel -Examples`) +\(Check out the examples `help Export-Excel -Examples`\) -* New function `Export-Charts` (requires Excel to be installed) - Export Excel charts out as JPG files +* New function `Export-Charts` \(requires Excel to be installed\) - Export Excel charts out as JPG files * New function `Add-ConditionalFormatting` Adds conditional formatting to worksheet * New function `Set-Format` Applies Number, font, alignment and color formatting to a range of Excel Cells * `ColorCompletion` an argument completer for `Colors` for params across functions @@ -505,12 +507,13 @@ I also worked out the parameters so you can do this, which is the same as passin `ps | select Company, Handles | Export-Excel` -#### 10/13/2017 +**10/13/2017** + Added `New-PivotTableDefinition`. You can create and wire up a PivotTable to a WorkSheet. You can also create as many PivotTable Worksheets to point a one Worksheet. Or, you create many Worksheets and many corresponding PivotTable Worksheets. Here you can create a WorkSheet with the data from `Get-Service`. Then create four PivotTables, pointing to the data each pivoting on a different dimension and showing a different chart -```powershell +```text $base = @{ SourceWorkSheet = 'gsv' PivotData = @{'Status' = 'count'} @@ -527,41 +530,46 @@ $ptd += New-PivotTableDefinition @base canstop -PivotRows canstop -ChartType Con Get-Service | Export-Excel -path $file -WorkSheetname gsv -Show -PivotTableDefinition $ptd ``` -#### 10/4/2017 -Thanks to https://github.com/ili101 : -- Fix Bug, Unable to find type [PSPlot] -- Fix Bug, AutoFilter with TableName create corrupted Excel file. +**10/4/2017** -#### 10/2/2017 -Thanks to [Jeremy Brun](https://github.com/jeremytbrun) -Fixed issues related to use of -Title parameter combined with column formatting parameters. -- [Issue #182](https://github.com/dfinke/ImportExcel/issues/182) -- [Issue #89](https://github.com/dfinke/ImportExcel/issues/89) +Thanks to [https://github.com/ili101](https://github.com/ili101) : -#### 9/28/2017 (Version 4.0.1) -- Added a new parameter called `Password` to import password protected files -- Added even more `Pester` tests for a more robust and bug free module -- Renamed parameter 'TopRow' to 'StartRow' - This allows us to be more concise when new parameters ('StartColumn', ..) will be added in the future Your code will not break after the update, because we added an alias for backward compatibility +* Fix Bug, Unable to find type \[PSPlot\] +* Fix Bug, AutoFilter with TableName create corrupted Excel file. + +**10/2/2017** + +Thanks to [Jeremy Brun](https://github.com/jeremytbrun) Fixed issues related to use of -Title parameter combined with column formatting parameters. + +* [Issue \#182](https://github.com/dfinke/ImportExcel/issues/182) +* [Issue \#89](https://github.com/dfinke/ImportExcel/issues/89) + +**9/28/2017 \(Version 4.0.1\)** + +* Added a new parameter called `Password` to import password protected files +* Added even more `Pester` tests for a more robust and bug free module +* Renamed parameter 'TopRow' to 'StartRow' + + This allows us to be more concise when new parameters \('StartColumn', ..\) will be added in the future Your code will not break after the update, because we added an alias for backward compatibility Special thanks to [robinmalik](https://github.com/robinmalik) for providing us with [the code](https://github.com/dfinke/ImportExcel/issues/174) to implement this new feature. A high five to [DarkLite1](https://github.com/DarkLite1) for the implementation. -#### 9/12/2017 (Version 4.0.0) +**9/12/2017 \(Version 4.0.0\)** Super thanks and hat tip to [DarkLite1](https://github.com/DarkLite1). There is now a new and improved `Import-Excel`, not only in functionality, but also improved readability, examples and more. Not only that, he's been running it in production in his company for a number of weeks! -*Added* `Update-FirstObjectProperties` Updates the first object to contain all the properties of the object with the most properties in the array. Check out the help. - - -***Breaking Changes***: Due to a big portion of the code that is rewritten some slightly different behavior can be expected from the `Import-Excel` function. This is especially true for importing empty Excel files with or without using the `TopRow` parameter. To make sure that your code is still valid, please check the examples in the help or the accompanying `Pester` test file. +_Added_ `Update-FirstObjectProperties` Updates the first object to contain all the properties of the object with the most properties in the array. Check out the help. +_**Breaking Changes**_: Due to a big portion of the code that is rewritten some slightly different behavior can be expected from the `Import-Excel` function. This is especially true for importing empty Excel files with or without using the `TopRow` parameter. To make sure that your code is still valid, please check the examples in the help or the accompanying `Pester` test file. Moving forward, we are planning to include automatic testing with the help of `Pester`, `Appveyor` and `Travis`. From now on any changes in the module will have to be accompanied by the corresponding `Pester` tests to avoid breakages of code and functionality. This is in preparation for new features coming down the road. -#### 7/3/2017 +**7/3/2017** + Thanks to [Mikkel Nordberg](https://www.linkedin.com/in/mikkelnordberg). He contributed a `ConvertTo-ExcelXlsx`. To use it, Excel needs to be installed. The function converts the older Excel file format ending in `.xls` to the new format ending in `.xlsx`. -#### 6/15/2017 +**6/15/2017** + Huge thank you to [DarkLite1](https://github.com/DarkLite1)! Refactoring of code, adding help, adding features, fixing bugs. Specifically this long outstanding one: [Export-Excel: Numeric values not correct](https://github.com/dfinke/ImportExcel/issues/168) @@ -570,21 +578,23 @@ It is fantastic to work with people like `DarkLite1` in the community, to help m Another shout out to [Damian Reeves](https://twitter.com/DamReev)! His questions turn into great features. He asked if it was possible to import an Excel worksheet and transform the data into SQL `INSERT` statements. We can now answer that question with a big YES! -```PowerShell +```text ConvertFrom-ExcelToSQLInsert People .\testSQLGen.xlsx ``` -``` +```text INSERT INTO People ('First', 'Last', 'The Zip') Values('John', 'Doe', '12345'); INSERT INTO People ('First', 'Last', 'The Zip') Values('Jim', 'Doe', '12345'); INSERT INTO People ('First', 'Last', 'The Zip') Values('Tom', 'Doe', '12345'); INSERT INTO People ('First', 'Last', 'The Zip') Values('Harry', 'Doe', '12345'); INSERT INTO People ('First', 'Last', 'The Zip') Values('Jane', 'Doe', '12345'); ``` -## Bonus Points + +### Bonus Points + Use the underlying `ConvertFrom-ExcelData` function and you can use a scriptblock to format the data however you want. -```PowerShell +```text ConvertFrom-ExcelData .\testSQLGen.xlsx { param($propertyNames, $record) @@ -596,9 +606,10 @@ ConvertFrom-ExcelData .\testSQLGen.xlsx { $reportRecord -join "`r`n" } ``` + Generates -``` +```text First: John Last: Doe The Zip: 12345 @@ -620,20 +631,24 @@ Last: Doe The Zip: 12345 ``` -#### 2/2/2017 +**2/2/2017** + Thank you to [DarkLite1](https://github.com/DarkLite1) for more updates + * TableName with parameter validation, throws an error when the TableName: - - Starts with something else then a letter - - Is NULL or empty - - Contains spaces -- Numeric parsing now uses `CurrentInfo` to use the system settings + * Starts with something else then a letter + * Is NULL or empty + * Contains spaces +* Numeric parsing now uses `CurrentInfo` to use the system settings + +**2/14/2017** -#### 2/14/2017 Big thanks to [DarkLite1](https://github.com/DarkLite1) for some great updates -* `-DataOnly` switch added to `Import-Excel`. When used it will only generate objects for rows that contain text values, not for empty rows or columns. +* `-DataOnly` switch added to `Import-Excel`. When used it will only generate objects for rows that contain text values, not for empty rows or columns. * `Get-ExcelWorkBookInfo` - retrieves information of an Excel workbook. -``` + + ```text Get-ExcelWorkbookInfo .\Test.xlsx CorePropertiesXml : #document @@ -655,18 +670,19 @@ Big thanks to [DarkLite1](https://github.com/DarkLite1) for some great updates Manager : Modified : 10/02/2017 12:45:37 CustomPropertiesXml : #document -``` + ``` -#### 12/22/2016 -- Added `-Now` switch. This short cuts the process, automatically creating a temp file and enables the `-Show`, `-AutoFilter`, `-AutoSize` switches. +**12/22/2016** -```PowerShell +* Added `-Now` switch. This short cuts the process, automatically creating a temp file and enables the `-Show`, `-AutoFilter`, `-AutoSize` switches. + +```text Get-Process | Select Company, Handles | Export-Excel -Now ``` -- Added ScriptBlocks for coloring cells. Check out [Examples](https://github.com/dfinke/ImportExcel/tree/master/Examples/FormatCellStyles) +* Added ScriptBlocks for coloring cells. Check out [Examples](https://github.com/dfinke/ImportExcel/tree/master/Examples/FormatCellStyles) -```PowerShell +```text Get-Process | Select-Object Company,Handles,PM, NPM| Export-Excel $xlfile -Show -AutoSize -CellStyleSB { @@ -687,23 +703,29 @@ Get-Process | } } ``` + ![](https://github.com/dfinke/ImportExcel/blob/master/images/CellFormatting.png?raw=true) -#### 9/28/2016 +**9/28/2016** + [Fixed](https://github.com/dfinke/ImportExcel/pull/126) PowerShell 3.0 compatibility. Thanks to [headsphere](https://github.com/headsphere). He used `$obj.PSObject.Methods[$target]` syntax to make it backward compatible. PS v4.0 and later allow `$obj.$target`. -Thank you to [xelsirko](https://github.com/xelsirko) for fixing - *Import-module importexcel gives version warning if started inside background job* +Thank you to [xelsirko](https://github.com/xelsirko) for fixing - _Import-module importexcel gives version warning if started inside background job_ + +**8/12/2016** -#### 8/12/2016 [Fixed](https://github.com/dfinke/ImportExcel/issues/115) reading the headers from cells, moved from using `Text` property to `Value` property. -#### 7/30/2016 +**7/30/2016** + * Added `Copy-ExcelWorksheet`. Let's you copy a work sheet from one Excel workbook to another. -#### 7/21/2016 -* Fixes `Import-Excel` #68 +**7/21/2016** + +* Fixes `Import-Excel` \#68 + +**7/7/2016** -#### 7/7/2016 [Attila Mihalicz](https://github.com/attilamihalicz) fixed two issues * Removing extra spaces after the backtick @@ -711,28 +733,31 @@ Thank you to [xelsirko](https://github.com/xelsirko) for fixing - *Import-module Thanks Attila. +**7/1/2016** -#### 7/1/2016 * Pushed 2.2.7 fixed resolve path in Get-ExcelSheetInfo * Fixed [Casting Error in Export-Excel](https://github.com/dfinke/ImportExcel/issues/108) * For `Import-Excel` change Resolve-Path to return ProviderPath for use with UNC -#### 6/01/2016 +**6/01/2016** + * Added -UseDefaultCredentials to both `Import-Html` and `Get-HtmlTable` -* New functions, `Import-UPS` and `Import-USPS`. Pass in a valid tracking # and it scrapes the page for the delivery details +* New functions, `Import-UPS` and `Import-USPS`. Pass in a valid tracking \# and it scrapes the page for the delivery details ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/Tracking.gif) -#### 4/30/2016 +**4/30/2016** + Huge thank you to [Willie Möller](https://github.com/W1M0R) * He added a version check so the PowerShell Classes don't cause issues for down-level version of PowerShell * He also contributed the first Pester tests for the module. Super! Check them out, they'll be the way tests will be implemented going forward -#### 4/18/2016 +**4/18/2016** + Thanks to [Paul Williams](https://github.com/pauldalewilliams) for this feature. Now data can be transposed to columns for better charting. -```PowerShell +```text $file = "C:\Temp\ps.xlsx" rm $file -ErrorAction Ignore @@ -746,12 +771,12 @@ ps | -PivotRows Company ` -PivotData @{PagedMemorySize='sum';PeakPagedMemorySize='sum'} ``` -![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PivotAsRows.png) +![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PivotAsRows.png) Add `-PivotDataToColumn` -```PowerShell +```text $file = "C:\Temp\ps.xlsx" rm $file -ErrorAction Ignore @@ -766,11 +791,14 @@ ps | -PivotData @{PagedMemorySize='sum';PeakPagedMemorySize='sum'} ` -PivotDataToColumn ``` -And here is the new chart view -![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PivotAsColumns.png) -#### 4/7/2016 + +And here is the new chart view ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PivotAsColumns.png) + +**4/7/2016** + Made more methods fluent -``` + +```text $t=Get-Range 0 5 .2 $t2=$t|%{$_*$_} @@ -783,12 +811,14 @@ $t3=$t|%{$_*$_*$_} Title("Hello World"). Show() ``` -#### 3/31/2016 + +**3/31/2016** + * Thanks to [redoz](https://github.com/redoz) Multi Series Charts are now working Also check out how you can create a table and then with Excel notation, index into the data for charting `"Impressions[A]"` -``` +```text $data = @" A,B,C,Date 2,1,1,2016-03-29 @@ -803,50 +833,58 @@ $c = New-ExcelChart -Title Impressions ` $data | Export-Excel temp.xlsx -AutoSize -TableName Impressions -Show -ExcelChartDefinition $c ``` + ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/MultiSeries.gif) -#### 3/26/2016 +**3/26/2016** + * Added `NumberFormat` parameter -``` +```text $data | Export-Excel -Path $file -Show -NumberFormat '[Blue]$#,##0.00;[Red]-$#,##0.00' ``` + ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/Formatting.png) +**3/18/2016** -#### 3/18/2016 * Added `Get-Range`, `New-Plot` and Plot Cos example * Updated EPPlus DLL. Allows markers to be changed and colored * Handles and warns if auto name range names are also valid Excel ranges ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PSPlot.gif) -#### 3/7/2016 +**3/7/2016** + * Added `Header` and `FirstDataRow` for `Import-Html` -#### 3/2/2016 +**3/2/2016** + * Added `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual` to `New-ConditionalText` -```PowerShell +```text echo 489 668 299 777 860 151 119 497 234 788 | Export-Excel c:\temp\test.xlsx -Show ` -ConditionalText (New-ConditionalText -ConditionalType GreaterThan 525) ``` + ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/GTConditional.png) -#### 2/22/2016 +**2/22/2016** + * `Import-Html` using Lee Holmes [Extracting Tables from PowerShell’s Invoke-WebRequest](http://www.leeholmes.com/blog/2015/01/05/extracting-tables-from-PowerShells-invoke-webrequest/) ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/ImportHtml.gif) -#### 2/17/2016 +**2/17/2016** + * Added Conditional Text types of `Equal` and `NotEqual` -* Phone #'s like '+33 011 234 34' will be now be handled correctly +* Phone \#'s like '+33 011 234 34' will be now be handled correctly -## Try *PassThru* +### Try _PassThru_ -```PowerShell +```text $file = "C:\Temp\passthru.xlsx" rm $file -ErrorAction Ignore @@ -871,32 +909,35 @@ $xlPkg.Dispose() Invoke-Item $file ``` -## Result +### Result + ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PassThru.png) -#### 1/18/2016 +**1/18/2016** * Added `Conditional Text Formatting`. [Boe Prox](https://twitter.com/proxb) posted about [HTML Reporting, Part 2: Take Your Reporting a Step Further](https://mcpmag.com/articles/2016/01/14/html-reporting-part-2.aspx) and colorized cells. Great idea, now part of the PowerShell Excel module. ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/ConditionalText2.gif) -#### 1/7/2016 -* Added `Get-ExcelSheetInfo` - Great contribution from *Johan Åkerström* check him out on [GitHub](https://github.com/CosmosKey) and [Twitter](https://twitter.com/neptune443) +**1/7/2016** + +* Added `Get-ExcelSheetInfo` - Great contribution from _Johan Åkerström_ check him out on [GitHub](https://github.com/CosmosKey) and [Twitter](https://twitter.com/neptune443) ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/GetExcelSheetInfo.png) -#### 12/26/2015 +**12/26/2015** * Added `NoLegend`, `Show-Category`, `ShowPercent` for all charts including Pivot Charts * Updated PieChart, BarChart, ColumnChart and Line chart to work with the pipeline and added `NoLegend`, `Show-Category`, `ShowPercent` -#### 12/17/2015 +**12/17/2015** These new features open the door for really sophisticated work sheet creation. Stay tuned for a [blog post](http://www.dougfinke.com/blog/) and examples. -***Quick List*** +_**Quick List**_ + * StartRow, StartColumn for placing data anywhere in a sheet * New-ExcelChart - Add charts to a sheet, multiple series for a chart, locate the chart anywhere on the sheet * AutoNameRange, Use functions and/or calculations in a cell @@ -904,165 +945,182 @@ Stay tuned for a [blog post](http://www.dougfinke.com/blog/) and examples. ![](https://raw.githubusercontent.com/dfinke/GifCam/master/JustCharts.gif) -#### 10/20/2015 +**10/20/2015** Big bug fix for version 3.0 PowerShell folks! This technique fails in 3.0 and works in 4.0 and later. -```PowerShell + +```text $m="substring" "hello".$m(2,1) ``` Adding `.invoke` works in 3.0 and later. -```PowerShell +```text $m="substring" "hello".$m.invoke(2,1) ``` -A ***big thank you*** to [DarkLite1](https://github.com/DarkLite1) for adding the help to Export-Excel. +A _**big thank you**_ to [DarkLite1](https://github.com/DarkLite1) for adding the help to Export-Excel. Added `-HeaderRow` parameter. Sometimes the heading does not start in Row 1. - -#### 10/16/2015 +**10/16/2015** Fixes [Export-Excel generates corrupt Excel file](https://github.com/dfinke/ImportExcel/issues/46) -#### 10/15/2015 +**10/15/2015** `Import-Excel` has a new parameter `NoHeader`. If data in the sheet does not have headers and you don't want to supply your own, `Import-Excel` will generate the property name. `Import-Excel` now returns `.Value` rather than `.Text` - -#### 10/1/2015 +**10/1/2015** Merged ValidateSet for Encoding and Extension. Thank you [Irwin Strachan](https://github.com/irwins). -#### 9/30/2015 +**9/30/2015** Export-Excel can now handle data that is **not** an object - echo a b c 1 $true 2.1 1/1/2015 | Export-Excel c:\temp\test.xlsx -Show +```text +echo a b c 1 $true 2.1 1/1/2015 | Export-Excel c:\temp\test.xlsx -Show +``` + Or - dir -Name | Export-Excel c:\temp\test.xlsx -Show +```text +dir -Name | Export-Excel c:\temp\test.xlsx -Show +``` -#### 9/25/2015 +**9/25/2015** -**Hide worksheets** -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. +**Hide worksheets** 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. -##### Example +**Example** + Here, you create four worksheets named `PM`,`Handles`,`Services` and `Files`. The last line creates the `Files` sheet and then hides the `Handles`,`Services` sheets. - $p = Get-Process +```text +$p = Get-Process - $p|select company, pm | Export-Excel $xlFile -WorkSheetname PM - $p|select company, handles| Export-Excel $xlFile -WorkSheetname Handles - Get-Service| Export-Excel $xlFile -WorkSheetname Services - - dir -File | Export-Excel $xlFile -WorkSheetname Files -Show -HideSheet Handles, Services +$p|select company, pm | Export-Excel $xlFile -WorkSheetname PM +$p|select company, handles| Export-Excel $xlFile -WorkSheetname Handles +Get-Service| Export-Excel $xlFile -WorkSheetname Services +dir -File | Export-Excel $xlFile -WorkSheetname Files -Show -HideSheet Handles, Services +``` **Note** There is a bug in EPPlus that does not let you hide the first worksheet created. Hopefully it'll resolved soon. -#### 9/11/2015 +**9/11/2015** Added Conditional formatting. See [TryConditional.ps1](https://github.com/dfinke/ImportExcel/blob/master/TryConditional.ps1) as an example. -Or, check out the short ***"How To"*** video. +Or, check out the short _**"How To"**_ video. [![image](http://www.dougfinke.com/videos/excelpsmodule/ExcelPSModule_First_Frame.png)](http://www.dougfinke.com/videos/excelpsmodule/excelpsmodule.mp4) +**8/21/2015** -#### 8/21/2015 * Now import Excel sheets even if the file is open in Excel. Thank you [Francois Lachance-Guillemette](https://github.com/francoislg) -#### 7/09/2015 +**7/09/2015** + * For -PivotRows you can pass a `hashtable` with the name of the property and the type of calculation. `Sum`, `Average`, `Max`, `Min`, `Product`, `StdDev`, `StdDevp`, `Var`, `Varp` -```PowerShell +```text Get-Service | - Export-Excel "c:\temp\test.xlsx" ` - -Show ` - -IncludePivotTable ` - -PivotRows status ` - -PivotData @{status='count'} + Export-Excel "c:\temp\test.xlsx" ` + -Show ` + -IncludePivotTable ` + -PivotRows status ` + -PivotData @{status='count'} ``` -#### 6/16/2015 (Thanks [Justin](https://github.com/zippy1981)) +**6/16/2015 \(Thanks Justin\)** + * Improvements to PivotTable overwriting * Added two parameters to Export-Excel - * RangeName - Turns the data piped to Export-Excel into a named range. - * TableName - Turns the data piped to Export-Excel into an excel table. + * RangeName - Turns the data piped to Export-Excel into a named range. + * TableName - Turns the data piped to Export-Excel into an excel table. Examples - Get-Process|Export-Excel foo.xlsx -Verbose -IncludePivotTable -TableName "Processes" -Show - Get-Process|Export-Excel foo.xlsx -Verbose -IncludePivotTable -RangeName "Processes" -Show +```text +Get-Process|Export-Excel foo.xlsx -Verbose -IncludePivotTable -TableName "Processes" -Show +Get-Process|Export-Excel foo.xlsx -Verbose -IncludePivotTable -RangeName "Processes" -Show +``` +**5/25/2015** -#### 5/25/2015 * Fixed null header problem -#### 5/17/2015 +**5/17/2015** + * Added three parameters: - * FreezeTopRow - Freezes the first row of the data - * AutoFilter - Enables filtering for the data in the sheet - * BoldTopRow - Bolds the top row of data, the column headers + * FreezeTopRow - Freezes the first row of the data + * AutoFilter - Enables filtering for the data in the sheet + * BoldTopRow - Bolds the top row of data, the column headers Example - Get-CimInstance win32_service | - select state, accept*, start*, caption | - Export-Excel test.xlsx -Show -BoldTopRow -AutoFilter -FreezeTopRow -AutoSize +```text +Get-CimInstance win32_service | + select state, accept*, start*, caption | + Export-Excel test.xlsx -Show -BoldTopRow -AutoFilter -FreezeTopRow -AutoSize +``` ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/FilterFreezeBold.gif) +**5/4/2015** -#### 5/4/2015 -* Published to PowerShell Gallery. In PowerShell v5 use `Find-Module importexcel` then `Find-Module importexcel | Install-Module` +* Published to PowerShell Gallery. In PowerShell v5 use `Find-Module importexcel` then `Find-Module importexcel | Install-Module` +**4/27/2015** -#### 4/27/2015 * datetime properties were displaying as ints, now are formatted -#### 4/25/2015 +**4/25/2015** + * Now you can create multiple Pivot tables in one pass - * Thanks to [pscookiemonster](https://twitter.com/pscookiemonster), he submitted a repro case to the EPPlus CodePlex project and got it fixed + * Thanks to [pscookiemonster](https://twitter.com/pscookiemonster), he submitted a repro case to the EPPlus CodePlex project and got it fixed -#### Example +**Example** - $ps = ps +```text +$ps = ps - $ps | - Export-Excel .\testExport.xlsx -WorkSheetname memory ` - -IncludePivotTable -PivotRows Company -PivotData PM ` - -IncludePivotChart -ChartType PieExploded3D - $ps | - Export-Excel .\testExport.xlsx -WorkSheetname handles ` - -IncludePivotTable -PivotRows Company -PivotData Handles ` - -IncludePivotChart -ChartType PieExploded3D -Show +$ps | + Export-Excel .\testExport.xlsx -WorkSheetname memory ` + -IncludePivotTable -PivotRows Company -PivotData PM ` + -IncludePivotChart -ChartType PieExploded3D +$ps | + Export-Excel .\testExport.xlsx -WorkSheetname handles ` + -IncludePivotTable -PivotRows Company -PivotData Handles ` + -IncludePivotChart -ChartType PieExploded3D -Show +``` ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/MultiplePivotTables.png) -#### 4/20/2015 +**4/20/2015** + * Included and embellished [Claus Nielsen](https://github.com/Claustn) function to take all sheets in an Excel file workbook and create a text file for each `ConvertFrom-ExcelSheet` * Renamed `Export-MultipleExcelSheets` to `ConvertFrom-ExcelSheet` -#### 4/13/2015 +**4/13/2015** + * You can add a title to the Excel "Report" `Title`, `TitleFillPattern`, `TitleBold`, `TitleSize`, `TitleBackgroundColor` - * Thanks to [Irwin Strachan](http://pshirwin.wordpress.com) for this and other great suggestions, testing and more + * Thanks to [Irwin Strachan](http://pshirwin.wordpress.com) for this and other great suggestions, testing and more +**4/10/2015** -#### 4/10/2015 * Renamed `AutoFitColumns` to `AutoSize` * Implemented `Export-MultipleExcelSheets` * Implemented `-Password` for a worksheet @@ -1070,79 +1128,88 @@ Example * Added examples for `Get-Help` * If Pivot table is requested, that sheet becomes the tab selected -#### 4/8/2015 +**4/8/2015** + * Implemented exporting data to **named sheets** via the -WorkSheetname parameter. -Examples -- -`gsv | Export-Excel .\test.xlsx -WorkSheetname Services` +Examples - `gsv | Export-Excel .\test.xlsx -WorkSheetname Services` `dir -file | Export-Excel .\test.xlsx -WorkSheetname Files` `ps | Export-Excel .\test.xlsx -WorkSheetname Processes -IncludePivotTable -Show -PivotRows Company -PivotData PM` -#### Convert (All or Some) Excel Sheets to Text files +**Convert \(All or Some\) Excel Sheets to Text files** Reads each sheet in TestSheets.xlsx and outputs it to the data directory as the sheet name with the extension .txt - ConvertFrom-ExcelSheet .\TestSheets.xlsx .\data +```text +ConvertFrom-ExcelSheet .\TestSheets.xlsx .\data +``` Reads and outputs sheets like Sheet10 and Sheet20 form TestSheets.xlsx and outputs it to the data directory as the sheet name with the extension .txt - ConvertFrom-ExcelSheet .\TestSheets.xlsx .\data sheet?0 +```text +ConvertFrom-ExcelSheet .\TestSheets.xlsx .\data sheet?0 +``` + +**Example Adding a Title** -#### Example Adding a Title You can set the pattern, size and of if the title is bold. - $p=@{ - Title = "Process Report as of $(Get-Date)" - TitleFillPattern = "LightTrellis" - TitleSize = 18 - TitleBold = $true +```text +$p=@{ + Title = "Process Report as of $(Get-Date)" + TitleFillPattern = "LightTrellis" + TitleSize = 18 + TitleBold = $true - Path = "$pwd\testExport.xlsx" - Show = $true - AutoSize = $true - } + Path = "$pwd\testExport.xlsx" + Show = $true + AutoSize = $true +} - Get-Process | - Where Company | Select Company, PM | - Export-Excel @p +Get-Process | + Where Company | Select Company, PM | + Export-Excel @p +``` ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/Title.png) -#### Example Export-MultipleExcelSheets +**Example Export-MultipleExcelSheets** + ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/ExportMultiple.gif) - $p = Get-Process +```text +$p = Get-Process - $DataToGather = @{ - PM = {$p|select company, pm} - Handles = {$p|select company, handles} - Services = {gsv} - Files = {dir -File} - Albums = {(Invoke-RestMethod http://www.dougfinke.com/PowerShellfordevelopers/albums.js)} - } +$DataToGather = @{ + PM = {$p|select company, pm} + Handles = {$p|select company, handles} + Services = {gsv} + Files = {dir -File} + Albums = {(Invoke-RestMethod http://www.dougfinke.com/PowerShellfordevelopers/albums.js)} +} - Export-MultipleExcelSheets -Show -AutoSize .\testExport.xlsx $DataToGather +Export-MultipleExcelSheets -Show -AutoSize .\testExport.xlsx $DataToGather +``` +_**NOTE**_ If the sheet exists when using _-WorkSheetname_ parameter, it will be deleted and then added with the new data. +### Get-Process Exported to Excel -***NOTE*** If the sheet exists when using *-WorkSheetname* parameter, it will be deleted and then added with the new data. +#### Total Physical Memory Grouped By Company -## Get-Process Exported to Excel - -### Total Physical Memory Grouped By Company ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/PivotTablesAndCharts.png) -## Importing data from an Excel spreadsheet +### Importing data from an Excel spreadsheet ![image](https://raw.githubusercontent.com/dfinke/ImportExcel/master/images/TryImportExcel.gif) You can also find EPPLus on [Nuget](https://www.nuget.org/packages/EPPlus/). -## Known Issues +### Known Issues * 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 + * Investigating a solution + * _Workaround_ delete the Excel file first, then do the export + diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..a7f9fbb --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,74 @@ +# Table of contents + +* [README](README.md) +* [InferData](inferdata/README.md) + * [Test-Boolean](inferdata/test-boolean.md) + * [Invoke-AllTests](inferdata/invoke-alltests.md) + * [Test-Integer](inferdata/test-integer.md) + * [Test-String](inferdata/test-string.md) + * [Test-Date](inferdata/test-date.md) + * [Test-Number](inferdata/test-number.md) +* [mdHelp](mdhelp/README.md) + * [en](mdhelp/en/README.md) + * [Expand-NumberFormat](mdhelp/en/expand-numberformat.md) + * [Open-ExcelPackage](mdhelp/en/open-excelpackage.md) + * [Add-ExcelChart](mdhelp/en/add-excelchart.md) + * [Copy-ExcelWorkSheet](mdhelp/en/copy-excelworksheet.md) + * [Set-ExcelRange](mdhelp/en/set-excelrange.md) + * [Import-Excel](mdhelp/en/import-excel.md) + * [Set-ExcelRow](mdhelp/en/set-excelrow.md) + * [Get-ExcelSheetInfo](mdhelp/en/get-excelsheetinfo.md) + * [New-PivotTableDefinition](mdhelp/en/new-pivottabledefinition.md) + * [Add-ExcelDataValidationRule](mdhelp/en/add-exceldatavalidationrule.md) + * [Join-Worksheet](mdhelp/en/join-worksheet.md) + * [New-ConditionalFormattingIconSet](mdhelp/en/new-conditionalformattingiconset.md) + * [Send-SQLDataToExcel](mdhelp/en/send-sqldatatoexcel.md) + * [Get-ExcelWorkbookInfo](mdhelp/en/get-excelworkbookinfo.md) + * [New-ConditionalText](mdhelp/en/new-conditionaltext.md) + * [Compare-WorkSheet](mdhelp/en/compare-worksheet.md) + * [New-ExcelChartDefinition](mdhelp/en/new-excelchartdefinition.md) + * [Remove-WorkSheet](mdhelp/en/remove-worksheet.md) + * [ConvertFrom-ExcelToSQLInsert](mdhelp/en/convertfrom-exceltosqlinsert.md) + * [Close-ExcelPackage](mdhelp/en/close-excelpackage.md) + * [Set-ExcelColumn](mdhelp/en/set-excelcolumn.md) + * [Add-WorkSheet](mdhelp/en/add-worksheet.md) + * [Add-ExcelTable](mdhelp/en/add-exceltable.md) + * [Convert-ExcelRangeToImage](mdhelp/en/convert-excelrangetoimage.md) + * [Add-ConditionalFormatting](mdhelp/en/add-conditionalformatting.md) + * [Update-FirstObjectProperties](mdhelp/en/update-firstobjectproperties.md) + * [Export-Excel](mdhelp/en/export-excel.md) + * [Select-Worksheet](mdhelp/en/select-worksheet.md) + * [Merge-Worksheet](mdhelp/en/merge-worksheet.md) + * [Merge-MultipleSheets](mdhelp/en/merge-multiplesheets.md) + * [Add-ExcelName](mdhelp/en/add-excelname.md) + * [ConvertFrom-ExcelSheet](mdhelp/en/convertfrom-excelsheet.md) + * [Add-PivotTable](mdhelp/en/add-pivottable.md) +* [Public](public/README.md) + * [Import-USPS](public/import-usps.md) + * [Get-Range](public/get-range.md) + * [Get-XYRange](public/get-xyrange.md) + * [Set-CellStyle](public/set-cellstyle.md) + * [Invoke-Sum](public/invoke-sum.md) + * [Get-ExcelColumnName](public/get-excelcolumnname.md) + * [Import-UPS](public/import-ups.md) + * [Set-WorksheetProtection](public/set-worksheetprotection.md) + * [New-Plot](public/new-plot.md) + * [Import-Html](public/import-html.md) + * [New-ExcelStyle](public/new-excelstyle.md) + * [ConvertFrom-ExcelData](public/convertfrom-exceldata.md) + * [ConvertTo-ExcelXlsx](public/convertto-excelxlsx.md) + * [New-PSItem](public/new-psitem.md) + * [Get-HtmlTable](public/get-htmltable.md) +* [Charting](charting/README.md) + * [LineChart](charting/linechart.md) + * [PieChart](charting/piechart.md) + * [ColumnChart](charting/columnchart.md) + * [BarChart](charting/barchart.md) + * [DoChart](charting/dochart.md) +* [Examples](examples/README.md) + * [Untitled](examples/untitled.md) + * [Charts](examples/charts/README.md) + * [Multiplecharts](examples/charts/multiplecharts.md) +* [Pivot](pivot/README.md) + * [Pivot](pivot/pivot.md) + diff --git a/charting/README.md b/charting/README.md new file mode 100644 index 0000000..db1e88b --- /dev/null +++ b/charting/README.md @@ -0,0 +1,2 @@ +# Charting + diff --git a/Charting/BarChart.md b/charting/barchart.md similarity index 86% rename from Charting/BarChart.md rename to charting/barchart.md index 0c73fa6..6217329 100644 --- a/Charting/BarChart.md +++ b/charting/barchart.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # BarChart ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text BarChart [[-targetData] ] [[-title] ] [[-ChartType] ] [-NoLegend] [-ShowCategory] [-ShowPercent] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -NoLegend -{{ Fill NoLegend Description }} ```yaml Type: SwitchParameter @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -ShowCategory -{{ Fill ShowCategory Description }} ```yaml Type: SwitchParameter @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -ShowPercent -{{ Fill ShowPercent Description }} ```yaml Type: SwitchParameter @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -108,7 +100,6 @@ Accept wildcard characters: False ``` ### -title -{{ Fill title Description }} ```yaml Type: Object @@ -123,7 +114,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,6 +124,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Charting/ColumnChart.md b/charting/columnchart.md similarity index 86% rename from Charting/ColumnChart.md rename to charting/columnchart.md index 0e57227..ae07af4 100644 --- a/Charting/ColumnChart.md +++ b/charting/columnchart.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # ColumnChart ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text ColumnChart [[-targetData] ] [[-title] ] [[-ChartType] ] [-NoLegend] [-ShowCategory] [-ShowPercent] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -NoLegend -{{ Fill NoLegend Description }} ```yaml Type: SwitchParameter @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -ShowCategory -{{ Fill ShowCategory Description }} ```yaml Type: SwitchParameter @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -ShowPercent -{{ Fill ShowPercent Description }} ```yaml Type: SwitchParameter @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -108,7 +100,6 @@ Accept wildcard characters: False ``` ### -title -{{ Fill title Description }} ```yaml Type: Object @@ -123,7 +114,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,6 +124,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Charting/doChart.md b/charting/dochart.md similarity index 89% rename from Charting/doChart.md rename to charting/dochart.md index 414559f..4b49f65 100644 --- a/Charting/doChart.md +++ b/charting/dochart.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # DoChart ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text DoChart [[-targetData] ] [[-title] ] [[-ChartType] ] [-NoLegend] [-ShowCategory] [-ShowPercent] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -NoLegend -{{ Fill NoLegend Description }} ```yaml Type: SwitchParameter @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -ShowCategory -{{ Fill ShowCategory Description }} ```yaml Type: SwitchParameter @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -ShowPercent -{{ Fill ShowPercent Description }} ```yaml Type: SwitchParameter @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -108,7 +100,6 @@ Accept wildcard characters: False ``` ### -title -{{ Fill title Description }} ```yaml Type: Object @@ -129,6 +120,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Charting/LineChart.md b/charting/linechart.md similarity index 85% rename from Charting/LineChart.md rename to charting/linechart.md index e45ea45..816305d 100644 --- a/Charting/LineChart.md +++ b/charting/linechart.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # LineChart ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text LineChart [[-targetData] ] [[-title] ] [[-ChartType] ] [-NoLegend] [-ShowCategory] [-ShowPercent] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -NoLegend -{{ Fill NoLegend Description }} ```yaml Type: SwitchParameter @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -ShowCategory -{{ Fill ShowCategory Description }} ```yaml Type: SwitchParameter @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -ShowPercent -{{ Fill ShowPercent Description }} ```yaml Type: SwitchParameter @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -108,7 +100,6 @@ Accept wildcard characters: False ``` ### -title -{{ Fill title Description }} ```yaml Type: Object @@ -123,7 +114,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,6 +124,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Charting/PieChart.md b/charting/piechart.md similarity index 86% rename from Charting/PieChart.md rename to charting/piechart.md index 93c7fdd..2f19a6c 100644 --- a/Charting/PieChart.md +++ b/charting/piechart.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # PieChart ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text PieChart [[-targetData] ] [[-title] ] [[-ChartType] ] [-NoLegend] [-ShowCategory] [-ShowPercent] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -NoLegend -{{ Fill NoLegend Description }} ```yaml Type: SwitchParameter @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -ShowCategory -{{ Fill ShowCategory Description }} ```yaml Type: SwitchParameter @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -ShowPercent -{{ Fill ShowPercent Description }} ```yaml Type: SwitchParameter @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -108,7 +100,6 @@ Accept wildcard characters: False ``` ### -title -{{ Fill title Description }} ```yaml Type: Object @@ -123,7 +114,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -132,6 +124,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/examples/README.md b/examples/README.md new file mode 100644 index 0000000..65afe60 --- /dev/null +++ b/examples/README.md @@ -0,0 +1,2 @@ +# Examples + diff --git a/examples/charts/README.md b/examples/charts/README.md new file mode 100644 index 0000000..d7bba70 --- /dev/null +++ b/examples/charts/README.md @@ -0,0 +1,2 @@ +# Charts + diff --git a/Examples/Charts/Multiplecharts.md b/examples/charts/multiplecharts.md similarity index 97% rename from Examples/Charts/Multiplecharts.md rename to examples/charts/multiplecharts.md index e3fac45..56cbc30 100644 --- a/Examples/Charts/Multiplecharts.md +++ b/examples/charts/multiplecharts.md @@ -1,6 +1,8 @@ +# Multiplecharts + ## PowerShell -```powershell +```text $xlFile = "$env:TEMP\ImportExcelExample.xlsx" Remove-Item $xlFile -ErrorAction Ignore @@ -21,4 +23,6 @@ $data | Export-Excel -Path $xlFile -AutoFilter -AutoNameRange -AutoSize -Show -E ``` ## Result + ![](https://raw.githubusercontent.com/dfinke/ImportExcel/master/Examples/Charts/Multiplecharts.png) + diff --git a/examples/untitled.md b/examples/untitled.md new file mode 100644 index 0000000..5094080 --- /dev/null +++ b/examples/untitled.md @@ -0,0 +1,2 @@ +# Untitled + diff --git a/inferdata/README.md b/inferdata/README.md new file mode 100644 index 0000000..d9adfda --- /dev/null +++ b/inferdata/README.md @@ -0,0 +1,2 @@ +# InferData + diff --git a/InferData/Invoke-AllTests.md b/inferdata/invoke-alltests.md similarity index 78% rename from InferData/Invoke-AllTests.md rename to inferdata/invoke-alltests.md index efe8455..37dd0ff 100644 --- a/InferData/Invoke-AllTests.md +++ b/inferdata/invoke-alltests.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Invoke-AllTests ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Invoke-AllTests [[-target] ] [-OnlyPassing] [-FirstOne] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -FirstOne -{{ Fill FirstOne Description }} ```yaml Type: SwitchParameter @@ -46,7 +42,6 @@ Accept wildcard characters: False ``` ### -OnlyPassing -{{ Fill OnlyPassing Description }} ```yaml Type: SwitchParameter @@ -61,7 +56,6 @@ Accept wildcard characters: False ``` ### -target -{{ Fill target Description }} ```yaml Type: Object @@ -82,6 +76,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/InferData/Test-Boolean.md b/inferdata/test-boolean.md similarity index 77% rename from InferData/Test-Boolean.md rename to inferdata/test-boolean.md index fe57b1f..d424faf 100644 --- a/InferData/Test-Boolean.md +++ b/inferdata/test-boolean.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Test-Boolean ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Test-Boolean [[-p] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -p -{{ Fill p Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/InferData/Test-Date.md b/inferdata/test-date.md similarity index 77% rename from InferData/Test-Date.md rename to inferdata/test-date.md index 74c8d35..3bc1688 100644 --- a/InferData/Test-Date.md +++ b/inferdata/test-date.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Test-Date ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Test-Date [[-p] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -p -{{ Fill p Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/InferData/Test-Integer.md b/inferdata/test-integer.md similarity index 77% rename from InferData/Test-Integer.md rename to inferdata/test-integer.md index 33ae133..9b96340 100644 --- a/InferData/Test-Integer.md +++ b/inferdata/test-integer.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Test-Integer ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Test-Integer [[-p] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -p -{{ Fill p Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/InferData/Test-Number.md b/inferdata/test-number.md similarity index 77% rename from InferData/Test-Number.md rename to inferdata/test-number.md index 0df805d..0a42713 100644 --- a/InferData/Test-Number.md +++ b/inferdata/test-number.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Test-Number ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Test-Number [[-p] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -p -{{ Fill p Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/InferData/Test-String.md b/inferdata/test-string.md similarity index 77% rename from InferData/Test-String.md rename to inferdata/test-string.md index 73c4f19..db6dc12 100644 --- a/InferData/Test-String.md +++ b/inferdata/test-string.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Test-String ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Test-String [[-p] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -p -{{ Fill p Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Get-ExcelWorkbookInfo.md b/mdHelp/en/Get-ExcelWorkbookInfo.md deleted file mode 100644 index 287db1f..0000000 --- a/mdHelp/en/Get-ExcelWorkbookInfo.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -external help file: ImportExcel-help.xml -Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel -schema: 2.0.0 ---- - -# Get-ExcelWorkbookInfo - -## SYNOPSIS -Retrieve information of an Excel workbook. - -## SYNTAX - -``` -Get-ExcelWorkbookInfo [-Path] [] -``` - -## DESCRIPTION -The Get-ExcelWorkbookInfo cmdlet retrieves information (LastModifiedBy, LastPrinted, Created, Modified, ...) fron an Excel workbook. -These are the same details that are visible in Windows Explorer when right clicking the Excel file, selecting Properties and check the Details tabpage. - -## EXAMPLES - -### EXAMPLE 1 -``` -Get-ExcelWorkbookInfo .\Test.xlsx -``` - -CorePropertiesXml : #document -Title : -Subject : -Author : Konica Minolta User -Comments : -Keywords : -LastModifiedBy : Bond, James (London) GBR -LastPrinted : 2017-01-21T12:36:11Z -Created : 17/01/2017 13:51:32 -Category : -Status : -ExtendedPropertiesXml : #document -Application : Microsoft Excel -HyperlinkBase : -AppVersion : 14.0300 -Company : Secret Service -Manager : -Modified : 10/02/2017 12:45:37 -CustomPropertiesXml : #document - -## PARAMETERS - -### -Path -Specifies the path to the Excel file. -This parameter is required. - -```yaml -Type: String -Parameter Sets: (All) -Aliases: FullName - -Required: True -Position: 1 -Default value: None -Accept pipeline input: True (ByPropertyName, ByValue) -Accept wildcard characters: False -``` - -### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). - -## INPUTS - -## OUTPUTS - -## NOTES -CHANGELOG -2016/01/07 Added Created by Johan Akerstrom (https://github.com/CosmosKey) - -## RELATED LINKS - -[https://github.com/dfinke/ImportExcel](https://github.com/dfinke/ImportExcel) - diff --git a/mdhelp/README.md b/mdhelp/README.md new file mode 100644 index 0000000..11aab70 --- /dev/null +++ b/mdhelp/README.md @@ -0,0 +1,2 @@ +# mdHelp + diff --git a/mdhelp/en/README.md b/mdhelp/en/README.md new file mode 100644 index 0000000..bee0a74 --- /dev/null +++ b/mdhelp/en/README.md @@ -0,0 +1,2 @@ +# en + diff --git a/mdHelp/en/Add-ConditionalFormatting.md b/mdhelp/en/add-conditionalformatting.md similarity index 90% rename from mdHelp/en/Add-ConditionalFormatting.md rename to mdhelp/en/add-conditionalformatting.md index 158fac7..a3189a6 100644 --- a/mdHelp/en/Add-ConditionalFormatting.md +++ b/mdhelp/en/add-conditionalformatting.md @@ -1,54 +1,63 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-ConditionalFormatting ## SYNOPSIS + Adds conditional formatting to all or part of a worksheet. ## SYNTAX ### NamedRule -``` + +```text Add-ConditionalFormatting [-Address] [-WorkSheet ] [-RuleType] [-ForegroundColor ] [-Reverse] [[-ConditionValue] ] [[-ConditionValue2] ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-NumberFormat ] [-Bold] [-Italic] [-Underline] [-StrikeThru] [-StopIfTrue] [-Priority ] [-PassThru] [] ``` ### DataBar -``` + +```text Add-ConditionalFormatting [-Address] [-WorkSheet ] -DataBarColor [-Priority ] [-PassThru] [] ``` ### ThreeIconSet -``` + +```text Add-ConditionalFormatting [-Address] [-WorkSheet ] -ThreeIconsSet [-Reverse] [-Priority ] [-PassThru] [] ``` ### FourIconSet -``` + +```text Add-ConditionalFormatting [-Address] [-WorkSheet ] -FourIconsSet [-Reverse] [-Priority ] [-PassThru] [] ``` ### FiveIconSet -``` + +```text Add-ConditionalFormatting [-Address] [-WorkSheet ] -FiveIconsSet [-Reverse] [-Priority ] [-PassThru] [] ``` ## DESCRIPTION + Conditional formatting allows Excel to: * Mark cells with icons depending on their value * Show a databar whose length indicates the value or a two or three color scale where the color indicates the relative value * Change the color, font, or number format of cells which meet given criteria -Add-ConditionalFormatting allows these parameters to be set; for fine tuning of the rules, the -PassThru switch will return the rule so that you can modify things which are specific to that type of rule, example, the values which correspond to each icon in an Icon-Set. + + Add-ConditionalFormatting allows these parameters to be set; for fine tuning of the rules, the -PassThru switch will return the rule so that you can modify things which are specific to that type of rule, example, the values which correspond to each icon in an Icon-Set. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $excel = $avdata | Export-Excel -Path (Join-path $FilePath "\Machines.XLSX" ) -WorksheetName "Server Anti-Virus" -AutoSize -FreezeTopRow -AutoFilter -PassThru Add-ConditionalFormatting -WorkSheet $excel.Workbook.Worksheets[1] -Address "b2:b1048576" -ForeGroundColor "RED" -RuleType ContainsText -ConditionValue "2003" Add-ConditionalFormatting -WorkSheet $excel.Workbook.Worksheets[1] -Address "i2:i1048576" -ForeGroundColor "RED" -RuleType ContainsText -ConditionValue "Disabled" @@ -57,19 +66,19 @@ PS\> $excel = $avdata | Export-Excel -Path (Join-path $FilePath "\Machines.XLSX" $excel.Save() ; $excel.Dispose() ``` -Here Export-Excel is called with the -PassThru parameter, so the ExcelPackage object representing Machines.XLSX is stored in $Excel.The desired worksheet is selected, and then columns" B" and "I" are conditionally formatted (excluding the top row) to show red text if they contain "2003" or "Disabled" respectively. +Here Export-Excel is called with the -PassThru parameter, so the ExcelPackage object representing Machines.XLSX is stored in $Excel.The desired worksheet is selected, and then columns" B" and "I" are conditionally formatted \(excluding the top row\) to show red text if they contain "2003" or "Disabled" respectively. A fixed date format is then applied to columns D to G, and the top row is formatted. Finally the workbook is saved and the Excel package object is closed. ### EXAMPLE 2 -``` + +```text PS\> $r = Add-ConditionalFormatting -WorkSheet $excel.Workbook.Worksheets[1] -Range "B1:B100" -ThreeIconsSet Flags -Passthru $r.Reverse = $true ; $r.Icon1.Type = "Num"; $r.Icon2.Type = "Num" ; $r.Icon2.value = 100 ; $r.Icon3.type = "Num" ;$r.Icon3.value = 1000 ``` - Again Export-Excel has been called with -PassThru leaving a package object in $Excel. This time B1:B100 has been conditionally formatted with 3 icons, using the "Flags" Icon-Set. @@ -77,14 +86,16 @@ This time B1:B100 has been conditionally formatted with 3 icons, using the "Flag Add-ConditionalFormatting does not provide accessto every option in the formatting rule, so -PassThru has been used and the rule is modified to apply the flags in reverse order, and transitions between flags are set to 100 and 1000. ### EXAMPLE 3 -``` + +```text PS\> Add-ConditionalFormatting -WorkSheet $sheet -Range "D2:D1048576" -DataBarColor Red ``` This time $sheet holds an ExcelWorkshseet object and databars are added to column D, excluding the top row. ### EXAMPLE 4 -``` + +```text PS\> Add-ConditionalFormatting -Address $worksheet.cells["FinishPosition"] -RuleType Equal -ConditionValue 1 -ForeGroundColor Purple -Bold -Priority 1 -StopIfTrue ``` @@ -95,7 +106,8 @@ If a cell in the "FinishPosition" range is 1, then the text is turned to Bold & This rule is moved to first in the priority list, and where cells have a value of 1, no other rules will be processed. ### EXAMPLE 5 -``` + +```text PS\> $excel = Get-ChildItem | Select-Object -Property Name,Length,LastWriteTime,CreationTime | Export-Excel "$env:temp\test43.xlsx" -PassThru -AutoSize $ws = $excel.Workbook.Worksheets["Sheet1"] $ws.Cells["E1"].Value = "SavedAt" @@ -108,34 +120,34 @@ PS\> $excel = Get-ChildItem | Select-Object -Property Name,Length,LastWriteTime, Add-ConditionalFormatting -WorkSheet $ws -address "D2:D$Lastrow" -RuleType Equal -ConditionValue "=C2" -ForeGroundColor Blue -StopIfTrue Close-ExcelPackage -Show $excel ``` + The first few lines of code export a list of file and directory names, sizes and dates to a spreadsheet. It puts the date of the export in cell F1. -The first Conditional format changes the color of files and folders that begin with a ".", "_" or anything else which sorts before "A". +The first Conditional format changes the color of files and folders that begin with a ".", "\_" or anything else which sorts before "A". The second Conditional format changes the Number format of numbers bigger than 1 million, for example 1,234,567,890 will dispay as "1,234.57M" -The third highlights datestamps of files less than a week old when the export was run; the = is necessary in the condition value otherwise the rule will look for the the text INT($F$1-7), and the cell address for the date is fixed using the standard Excel $ notation. +The third highlights datestamps of files less than a week old when the export was run; the = is necessary in the condition value otherwise the rule will look for the the text INT\($F$1-7\), and the cell address for the date is fixed using the standard Excel $ notation. The final Conditional format looks for files which have not changed since they were created. Here the condition value is "=C2". The = sign means C2 is treated as a formula, not literal text. Unlike the file age, we want the cell used to change for each cell where the conditional format applies. -The first cell in the conditional format range is D2, which is compared against C2, then D3 is compared against C3 and so on. -A common mistake is to include the title row in the range and accidentally apply conditional formatting to it, or to begin the -range at row 2 but use row 1 as the starting point for comparisons. +The first cell in the conditional format range is D2, which is compared against C2, then D3 is compared against C3 and so on. A common mistake is to include the title row in the range and accidentally apply conditional formatting to it, or to begin the range at row 2 but use row 1 as the starting point for comparisons. ### EXAMPLE 6 -``` + +```text PS\> Add-ConditionalFormatting $ws.Cells["B:B"] GreaterThan 10000000 -Fore Red -Stop -Pri 1 ``` -This version shows the shortest syntax - the Address, Ruletype, and Conditionvalue can be identified from their position, and ForegroundColor, -StopIfTrue and Priority can all be shortend. +This version shows the shortest syntax - the Address, Ruletype, and Conditionvalue can be identified from their position, and ForegroundColor, StopIfTrue and Priority can all be shortend. ## PARAMETERS ### -Address -A block of cells to format - you can use a named range with -Address $ws.names\[1\] or $ws.cells\["RangeName"\] + +A block of cells to format - you can use a named range with -Address $ws.names\[1\] or $ws.cells\["RangeName"\] ```yaml Type: Object @@ -150,6 +162,7 @@ Accept wildcard characters: False ``` ### -WorkSheet + The worksheet where the format is to be applied ```yaml @@ -165,6 +178,7 @@ Accept wildcard characters: False ``` ### -RuleType + A standard named-rule - Top / Bottom / Less than / Greater than / Contains etc. ```yaml @@ -181,6 +195,7 @@ Accept wildcard characters: False ``` ### -ForegroundColor + Text color for matching objects ```yaml @@ -196,6 +211,7 @@ Accept wildcard characters: False ``` ### -DataBarColor + Color for databar type charts ```yaml @@ -211,8 +227,8 @@ Accept wildcard characters: False ``` ### -ThreeIconsSet -One of the three-icon set types (e.g. -Traffic Lights) + +One of the three-icon set types \(e.g. Traffic Lights\) ```yaml Type: eExcelconditionalFormatting3IconsSetType @@ -228,6 +244,7 @@ Accept wildcard characters: False ``` ### -FourIconsSet + A four-icon set name ```yaml @@ -244,6 +261,7 @@ Accept wildcard characters: False ``` ### -FiveIconsSet + A five-icon set name ```yaml @@ -260,6 +278,7 @@ Accept wildcard characters: False ``` ### -Reverse + Use the Icon-Set in reverse order, or reverse the orders of Two- & Three-Color Scales ```yaml @@ -275,7 +294,8 @@ Accept wildcard characters: False ``` ### -ConditionValue -A value for the condition (for example 2000 if the test is 'lessthan 2000'; Formulas should begin with "=" ) + +A value for the condition \(for example 2000 if the test is 'lessthan 2000'; Formulas should begin with "=" \) ```yaml Type: Object @@ -290,6 +310,7 @@ Accept wildcard characters: False ``` ### -ConditionValue2 + A second value for the conditions like "Between X and Y" ```yaml @@ -305,6 +326,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + Background color for matching items ```yaml @@ -320,6 +342,7 @@ Accept wildcard characters: False ``` ### -BackgroundPattern + Background pattern for matching items ```yaml @@ -336,6 +359,7 @@ Accept wildcard characters: False ``` ### -PatternColor + Secondary color when a background pattern requires it ```yaml @@ -351,6 +375,7 @@ Accept wildcard characters: False ``` ### -NumberFormat + Sets the numeric format for matching items ```yaml @@ -366,6 +391,7 @@ Accept wildcard characters: False ``` ### -Bold + Put matching items in bold face ```yaml @@ -381,6 +407,7 @@ Accept wildcard characters: False ``` ### -Italic + Put matching items in italic ```yaml @@ -396,6 +423,7 @@ Accept wildcard characters: False ``` ### -Underline + Underline matching items ```yaml @@ -411,6 +439,7 @@ Accept wildcard characters: False ``` ### -StrikeThru + Strikethrough text of matching items ```yaml @@ -426,6 +455,7 @@ Accept wildcard characters: False ``` ### -StopIfTrue + Prevent the processing of subsequent rules ```yaml @@ -441,6 +471,7 @@ Accept wildcard characters: False ``` ### -Priority + Set the sequence for rule processing ```yaml @@ -456,6 +487,7 @@ Accept wildcard characters: False ``` ### -PassThru + If specified pass the rule back to the caller to allow additional customization. ```yaml @@ -471,7 +503,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -480,3 +513,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-ExcelChart.md b/mdhelp/en/add-excelchart.md similarity index 91% rename from mdHelp/en/Add-ExcelChart.md rename to mdhelp/en/add-excelchart.md index 371661e..abbe5f8 100644 --- a/mdHelp/en/Add-ExcelChart.md +++ b/mdhelp/en/add-excelchart.md @@ -1,38 +1,43 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-ExcelChart ## SYNOPSIS + Creates a chart in an existing Excel worksheet. ## SYNTAX -### Worksheet (Default) -``` +### Worksheet \(Default\) + +```text Add-ExcelChart [-Title ] [-ChartType ] [-ChartTrendLine ] [-XRange ] [-YRange ] [-Width ] [-Height ] [-Row ] [-RowOffSetPixels ] [-Column ] [-ColumnOffSetPixels ] [-LegendPosition ] [-LegendSize ] [-LegendBold] [-NoLegend] [-ShowCategory] [-ShowPercent] [-SeriesHeader ] [-TitleBold] [-TitleSize ] [-XAxisTitleText ] [-XAxisTitleBold] [-XAxisTitleSize ] [-XAxisNumberformat ] [-XMajorUnit ] [-XMinorUnit ] [-XMaxValue ] [-XMinValue ] [-XAxisPosition ] [-YAxisTitleText ] [-YAxisTitleBold] [-YAxisTitleSize ] [-YAxisNumberformat ] [-YMajorUnit ] [-YMinorUnit ] [-YMaxValue ] [-YMinValue ] [-YAxisPosition ] [-PassThru] [] ``` ### PivotTable -``` + +```text Add-ExcelChart -PivotTable [-Title ] [-ChartType ] [-ChartTrendLine ] [-XRange ] [-YRange ] [-Width ] [-Height ] [-Row ] [-RowOffSetPixels ] [-Column ] [-ColumnOffSetPixels ] [-LegendPosition ] [-LegendSize ] [-LegendBold] [-NoLegend] [-ShowCategory] [-ShowPercent] [-SeriesHeader ] [-TitleBold] [-TitleSize ] [-XAxisTitleText ] [-XAxisTitleBold] [-XAxisTitleSize ] [-XAxisNumberformat ] [-XMajorUnit ] [-XMinorUnit ] [-XMaxValue ] [-XMinValue ] [-XAxisPosition ] [-YAxisTitleText ] [-YAxisTitleBold] [-YAxisTitleSize ] [-YAxisNumberformat ] [-YMajorUnit ] [-YMinorUnit ] [-YMaxValue ] [-YMinValue ] [-YAxisPosition ] [-PassThru] [] ``` ## DESCRIPTION + Creates a chart. -It is possible to configure the type of chart, the range of X values (labels) and Y values, the title, the legend, the ranges for both axes, the format and position of the axes. +It is possible to configure the type of chart, the range of X values \(labels\) and Y values, the title, the legend, the ranges for both axes, the format and position of the axes. Normally the command does not return anything, but if -passthru is specified the chart is returned so that it can be customized. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $Excel = ConvertFrom-Csv @" Product, City, Sales Apple, London, 300 @@ -46,15 +51,15 @@ PS\> $Excel = ConvertFrom-Csv @" Close-ExcelPackage -Show $Excel ``` -The first command expands a multi-line string into 6 rows of data which is exported to new Excel file; leaving an ExcelPackage object in $excel -The second command adds a chart - the cell ranges are explicitly specified. +The first command expands a multi-line string into 6 rows of data which is exported to new Excel file; leaving an ExcelPackage object in $excel The second command adds a chart - the cell ranges are explicitly specified. -Note that the XRange (labels) is TWO columns wide and the chart will combine the name of the product and the name of the City to create the label. +Note that the XRange \(labels\) is TWO columns wide and the chart will combine the name of the product and the name of the City to create the label. The width of the chart is set explictly, the default legend is used and there is no Chart title. ### EXAMPLE 2 -``` + +```text PS\> $Excel = Invoke-Sum (Get-Process) Company Handles, PM, VirtualMemorySize | Export-Excel $path -AutoSize -ExcelChartDefinition $c -AutoNameRange -PassThru Add-ExcelChart -Worksheet $Excel.Workbook.Worksheets[1] -Title "VM use" -ChartType PieExploded3D -XRange "Name" -YRange "VirtualMemorySize" -NoLegend -ShowCategory Close-ExcelPackage $Excel -Show @@ -67,7 +72,8 @@ The Second line uses the ranges to specify a chart - the labels come from the ra The chart is specified as a 3D exploded PIE chart, with a title of "VM Use" and instead of a legend the the pie slices are identified with a label. ### EXAMPLE 3 -``` + +```text PS\> $Excel = Invoke-Sum (Get-Process) Company Handles, PM, VirtualMemorySize | Export-Excel test.xlsx -TableName Processes -PassThru Add-ExcelChart -Worksheet $Excel.Workbook.Worksheets[1] -Title Stats -ChartType LineMarkersStacked -XRange "Processes[Name]" -YRange "Processes[PM]", "Processes[VirtualMemorySize]" -SeriesHeader 'PM', 'VMSize' Close-ExcelPackage $Excel -Show @@ -75,21 +81,19 @@ PS\> $Excel = Invoke-Sum (Get-Process) Company Handles, PM, VirtualMemorySize | The first line exports information to a table in new file; and captures the excel Package object in $Excel -The second line creates a chart on the first page of the work sheet, using the notation "TableName[ColumnnName]" to refer to the data, the labels come Name column in the table, and the data series from its PM and VirtualMemorySize columns. -The display names for these in the header are set to 'PM' and 'VMSize'. +The second line creates a chart on the first page of the work sheet, using the notation "TableName\[ColumnnName\]" to refer to the data, the labels come Name column in the table, and the data series from its PM and VirtualMemorySize columns. The display names for these in the header are set to 'PM' and 'VMSize'. ### EXAMPLE 4 -``` + +```text PS\> $excel = 0..360 | ForEach-Object {[pscustomobject][ordered]@{x = $_; Sinx = "=Sin(Radians(x)) "}} | Export-Excel -AutoNameRange -Path Text.xlsx -WorkSheetname SinX -PassThru Add-ExcelChart -Worksheet $excel.Workbook.Worksheets["Sinx"] -ChartType line -XRange "X" -YRange "Sinx" -Title "Graph of Sine X" -TitleBold -TitleSize 14 \` -Column 2 -ColumnOffSetPixels 35 -Width 800 -XAxisTitleText "Degrees" -XAxisTitleBold -XAxisTitleSize 12 -XMajorUnit 30 -XMinorUnit 10 -XMinValue 0 -XMaxValue 361 -XAxisNumberformat "000" \` -YMinValue -1.25 -YMaxValue 1.25 -YMajorUnit 0.25 -YAxisNumberformat "0.00" -YAxisTitleText "Sine" -YAxisTitleBold -YAxisTitleSize 12 \` -SeriesHeader "Sin(x)" -LegendSize 8 -legendBold -LegendPosition Bottom Close-ExcelPackage $Excel -Show - ``` - The first line puts numbers from 0 to 360 into a sheet, as the first column, and a formula to calculate the Sine of that number of number of degrees in the second column. It creates named-ranges for the two columns - "X" and "SinX" respectively The Add-ExcelChart command adds a chart to that worksheet, specifying a line chart with the X values coming from named-range "X" and the Y values coming from named-range "SinX". The chart has a title, and is positioned to the right of column 2 and sized 800 pixels wide @@ -98,11 +102,12 @@ The X-axis is labelled "Degrees", in bold 12 point type and runs from 0 to 361 w The Y-axis is labelled "Sine" and to allow some room above and below its scale runs from -1.25 to 1.25, and is marked off in units of 0.25 shown to two decimal places. -The key will for the chart will be at the bottom in 8 point bold type and the line will be named "Sin(x)". +The key will for the chart will be at the bottom in 8 point bold type and the line will be named "Sin\(x\)". ## PARAMETERS ### -Worksheet + An existing Sheet where the chart will be created. ```yaml @@ -118,6 +123,7 @@ Accept wildcard characters: False ``` ### -PivotTable + Instead of specify X and Y ranges, get data from a PivotTable by passing a PivotTable Object. ```yaml @@ -133,6 +139,7 @@ Accept wildcard characters: False ``` ### -Title + The title for the chart. ```yaml @@ -148,8 +155,8 @@ Accept wildcard characters: False ``` ### -ChartType -One of the built-in chart types, such as Pie, ClusteredColumn, Line etc. -Defaults to "ColumnStacked". + +One of the built-in chart types, such as Pie, ClusteredColumn, Line etc. Defaults to "ColumnStacked". ```yaml Type: eChartType @@ -165,7 +172,6 @@ Accept wildcard characters: False ``` ### -ChartTrendLine -{{ Fill ChartTrendLine Description }} ```yaml Type: eTrendLine[] @@ -181,6 +187,7 @@ Accept wildcard characters: False ``` ### -XRange + The range of cells containing values for the X-Axis - usually labels. ```yaml @@ -196,7 +203,8 @@ Accept wildcard characters: False ``` ### -YRange -The range(s) of cells holding values for the Y-Axis - usually "data". + +The range\(s\) of cells holding values for the Y-Axis - usually "data". ```yaml Type: Object @@ -211,6 +219,7 @@ Accept wildcard characters: False ``` ### -Width + Width of the chart in Pixels; defaults to 500. ```yaml @@ -226,6 +235,7 @@ Accept wildcard characters: False ``` ### -Height + Height of the chart in Pixels; defaults to 350. ```yaml @@ -241,7 +251,8 @@ Accept wildcard characters: False ``` ### -Row -Row position of the top left corner of the chart. ) places at the top of the sheet, 1 below row 1 and so on. + +Row position of the top left corner of the chart. \) places at the top of the sheet, 1 below row 1 and so on. ```yaml Type: Int32 @@ -256,7 +267,8 @@ Accept wildcard characters: False ``` ### -RowOffSetPixels -Offset to position the chart by a fraction of a row. + +Offset to position the chart by a fraction of a row. ```yaml Type: Int32 @@ -271,6 +283,7 @@ Accept wildcard characters: False ``` ### -Column + Column position of the top left corner of the chart; 0 places at the edge of the sheet 1 to the right of column A and so on. ```yaml @@ -286,6 +299,7 @@ Accept wildcard characters: False ``` ### -ColumnOffSetPixels + Offset to position the chart by a fraction of a column. ```yaml @@ -301,6 +315,7 @@ Accept wildcard characters: False ``` ### -LegendPosition + Location of the key, either left, right, top, bottom or TopRight. ```yaml @@ -317,6 +332,7 @@ Accept wildcard characters: False ``` ### -LegendSize + Font size for the key. ```yaml @@ -332,6 +348,7 @@ Accept wildcard characters: False ``` ### -LegendBold + Sets the key in bold type. ```yaml @@ -347,6 +364,7 @@ Accept wildcard characters: False ``` ### -NoLegend + If specified, turns of display of the key. If you only have one data series it may be preferable to use the title to say what the chart is. ```yaml @@ -362,6 +380,7 @@ Accept wildcard characters: False ``` ### -ShowCategory + Attaches a category label, in charts which support this. ```yaml @@ -377,6 +396,7 @@ Accept wildcard characters: False ``` ### -ShowPercent + Attaches a percentage label, in charts which support this. ```yaml @@ -392,7 +412,8 @@ Accept wildcard characters: False ``` ### -SeriesHeader -Specify explicit name(s) for the data series, which will appear in the legend/key. The contents of a cell can be specified in the from =Sheet9!Z10 . + +Specify explicit name\(s\) for the data series, which will appear in the legend/key. The contents of a cell can be specified in the from =Sheet9!Z10 . ```yaml Type: String[] @@ -407,6 +428,7 @@ Accept wildcard characters: False ``` ### -TitleBold + Sets the title in bold face. ```yaml @@ -422,6 +444,7 @@ Accept wildcard characters: False ``` ### -TitleSize + Sets the point size for the title. ```yaml @@ -437,6 +460,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleText + Specifies a title for the X-axis. ```yaml @@ -452,6 +476,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleBold + Sets the X-axis title in bold face. ```yaml @@ -467,6 +492,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleSize + Sets the font size for the axis title. ```yaml @@ -482,7 +508,8 @@ Accept wildcard characters: False ``` ### -XAxisNumberformat -A number formatting string, like "#,##0.00", for numbers along the X-axis. + +A number formatting string, like "\#,\#\#0.00", for numbers along the X-axis. ```yaml Type: String @@ -497,6 +524,7 @@ Accept wildcard characters: False ``` ### -XMajorUnit + Spacing for the major gridlines / tick marks along the X-axis. ```yaml @@ -512,6 +540,7 @@ Accept wildcard characters: False ``` ### -XMinorUnit + Spacing for the minor gridlines / tick marks along the X-axis. ```yaml @@ -527,6 +556,7 @@ Accept wildcard characters: False ``` ### -XMaxValue + Maximum value for the scale along the X-axis. ```yaml @@ -542,6 +572,7 @@ Accept wildcard characters: False ``` ### -XMinValue + Minimum value for the scale along the X-axis. ```yaml @@ -557,7 +588,8 @@ Accept wildcard characters: False ``` ### -XAxisPosition -Position for the X-axis (Top or Bottom). + +Position for the X-axis \(Top or Bottom\). ```yaml Type: eAxisPosition @@ -573,6 +605,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleText + Specifies a title for the Y-axis. ```yaml @@ -588,6 +621,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleBold + Sets the Y-axis title in bold face. ```yaml @@ -603,6 +637,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleSize + Sets the font size for the Y-axis title ```yaml @@ -618,7 +653,8 @@ Accept wildcard characters: False ``` ### -YAxisNumberformat -A number formatting string, like "#,##0.00", for numbers on the Y-axis. + +A number formatting string, like "\#,\#\#0.00", for numbers on the Y-axis. ```yaml Type: String @@ -633,6 +669,7 @@ Accept wildcard characters: False ``` ### -YMajorUnit + Spacing for the major gridlines / tick marks on the Y-axis. ```yaml @@ -648,6 +685,7 @@ Accept wildcard characters: False ``` ### -YMinorUnit + Spacing for the minor gridlines / tick marks on the Y-axis. ```yaml @@ -663,6 +701,7 @@ Accept wildcard characters: False ``` ### -YMaxValue + Maximum value on the Y-axis. ```yaml @@ -678,6 +717,7 @@ Accept wildcard characters: False ``` ### -YMinValue + Minimum value on the Y-axis. ```yaml @@ -693,7 +733,8 @@ Accept wildcard characters: False ``` ### -YAxisPosition -Position for the Y-axis (Left or Right). + +Position for the Y-axis \(Left or Right\). ```yaml Type: eAxisPosition @@ -709,6 +750,7 @@ Accept wildcard characters: False ``` ### -PassThru + Add-Excel chart doesn't normally return anything, but if -PassThru is specified it returns the newly created chart to allow it to be fine tuned. ```yaml @@ -724,13 +766,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.Drawing.Chart.ExcelChart + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-ExcelDataValidationRule.md b/mdhelp/en/add-exceldatavalidationrule.md similarity index 88% rename from mdHelp/en/Add-ExcelDataValidationRule.md rename to mdhelp/en/add-exceldatavalidationrule.md index af06331..9e66865 100644 --- a/mdHelp/en/Add-ExcelDataValidationRule.md +++ b/mdhelp/en/add-exceldatavalidationrule.md @@ -1,36 +1,40 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-ExcelDataValidationRule ## SYNOPSIS + Adds data validation to a range of cells ## SYNTAX -``` +```text Add-ExcelDataValidationRule [[-Range] ] [-WorkSheet ] [-ValidationType ] [-Operator ] [-Value ] [-Value2 ] [-Formula ] [-Formula2 ] [-ValueSet ] [-ShowErrorMessage] [-ErrorStyle ] [-ErrorTitle ] [-ErrorBody ] [-ShowPromptMessage] [-PromptBody ] [-PromptTitle ] [-NoBlank ] [] ``` ## DESCRIPTION + Excel supports the validation of user input, and ranges of cells can be marked to only contain numbers, or date, or Text up to a particular length, or selections from a list. This command adds validation rules to a worksheet. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\>Add-ExcelDataValidationRule -WorkSheet $PlanSheet -Range 'E2:E1001' -ValidationType Integer -Operator between -Value 0 -Value2 100 \` -ShowErrorMessage -ErrorStyle stop -ErrorTitle 'Invalid Data' -ErrorBody 'Percentage must be a whole number between 0 and 100' ``` -This defines a validation rule on cells E2-E1001; it is an integer rule and requires a number between 0 and 100. If a value is input with a fraction, negative number, or positive number \> 100 a stop dialog box appears. +This defines a validation rule on cells E2-E1001; it is an integer rule and requires a number between 0 and 100. If a value is input with a fraction, negative number, or positive number > 100 a stop dialog box appears. ### EXAMPLE 2 -``` + +```text PS\>Add-ExcelDataValidationRule -WorkSheet $PlanSheet -Range 'B2:B1001' -ValidationType List -Formula 'values!$a$2:$a$1000' -ShowErrorMessage -ErrorStyle stop -ErrorTitle 'Invalid Data' -ErrorBody 'You must select an item from the list' ``` @@ -40,16 +44,18 @@ This defines a list rule on Cells B2:1001, and the posible values are in a sheet If $ signs were left out of the fomrmula B2 would be checked against A2-A1000, B3, against A3-A1001, B4 against A4-A1002 up to B1001 beng checked against A1001-A1999 ### EXAMPLE 3 -``` + +```text PS\>Add-ExcelDataValidationRule -WorkSheet $PlanSheet -Range 'I2:N1001' -ValidationType List -ValueSet @('yes','YES','Yes') -ShowErrorMessage -ErrorStyle stop -ErrorTitle 'Invalid Data' -ErrorBody "Select Yes or leave blank for no" ``` - Similar to the previous example but this time provides a value set; Excel comparisons are case sesnsitive, hence 3 versions of Yes. +Similar to the previous example but this time provides a value set; Excel comparisons are case sesnsitive, hence 3 versions of Yes. ## PARAMETERS ### -Range + The range of cells to be validate, for example, "B2:C100" ```yaml @@ -65,6 +71,7 @@ Accept wildcard characters: False ``` ### -WorkSheet + The worksheet where the cells should be validated ```yaml @@ -80,6 +87,7 @@ Accept wildcard characters: False ``` ### -ValidationType + An option corresponding to a choice from the 'Allow' pull down on the settings page in the Excel dialog. "Any" means "any allowed" - in other words, no Validation ```yaml @@ -95,6 +103,7 @@ Accept wildcard characters: False ``` ### -Operator + The operator to apply to Decimal, Integer, TextLength, DateTime and time fields, for example "equal" or "between" ```yaml @@ -111,6 +120,7 @@ Accept wildcard characters: False ``` ### -Value + For Decimal, Integer, TextLength, DateTime the \[first\] data value ```yaml @@ -126,7 +136,8 @@ Accept wildcard characters: False ``` ### -Value2 -When using the between operator, the second data value + +When using the between operator, the second data value ```yaml Type: Object @@ -141,8 +152,8 @@ Accept wildcard characters: False ``` ### -Formula -The \[first\] data value as a formula. -Use absolute formulas $A$1 if (e.g.) you want all cells to check against the same list + +The \[first\] data value as a formula. Use absolute formulas $A$1 if \(e.g.\) you want all cells to check against the same list ```yaml Type: Object @@ -157,6 +168,7 @@ Accept wildcard characters: False ``` ### -Formula2 + When using the between operator, the second data value as a formula ```yaml @@ -172,7 +184,8 @@ Accept wildcard characters: False ``` ### -ValueSet -When using the list validation type, a set of values (rather than refering to Sheet!B$2:B$100 ) + +When using the list validation type, a set of values \(rather than refering to Sheet!B$2:B$100 \) ```yaml Type: Object @@ -187,6 +200,7 @@ Accept wildcard characters: False ``` ### -ShowErrorMessage + Corresponds to the the 'Show Error alert ...' check box on error alert page in the Excel dialog ```yaml @@ -202,6 +216,7 @@ Accept wildcard characters: False ``` ### -ErrorStyle + Stop, Warning, or Infomation, corresponding to to the style setting in the Excel dialog ```yaml @@ -218,7 +233,8 @@ Accept wildcard characters: False ``` ### -ErrorTitle -The title for the message box corresponding to to the title setting in the Excel dialog + +The title for the message box corresponding to to the title setting in the Excel dialog ```yaml Type: String @@ -233,6 +249,7 @@ Accept wildcard characters: False ``` ### -ErrorBody + The error message corresponding to to the Error message setting in the Excel dialog ```yaml @@ -248,7 +265,8 @@ Accept wildcard characters: False ``` ### -ShowPromptMessage -Corresponds to the the 'Show Input message ...' check box on input message page in the Excel dialog + +Corresponds to the the 'Show Input message ...' check box on input message page in the Excel dialog ```yaml Type: SwitchParameter @@ -263,6 +281,7 @@ Accept wildcard characters: False ``` ### -PromptBody + The prompt message corresponding to to the Input message setting in the Excel dialog ```yaml @@ -278,7 +297,8 @@ Accept wildcard characters: False ``` ### -PromptTitle -The title for the message box corresponding to to the title setting in the Excel dialog + +The title for the message box corresponding to to the title setting in the Excel dialog ```yaml Type: String @@ -293,6 +313,7 @@ Accept wildcard characters: False ``` ### -NoBlank + By default the 'Ignore blank' option will be selected, unless NoBlank is sepcified. ```yaml @@ -308,7 +329,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -317,3 +339,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-ExcelName.md b/mdhelp/en/add-excelname.md similarity index 78% rename from mdHelp/en/Add-ExcelName.md rename to mdhelp/en/add-excelname.md index df1eb37..4cfb191 100644 --- a/mdHelp/en/Add-ExcelName.md +++ b/mdhelp/en/add-excelname.md @@ -1,36 +1,40 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-ExcelName ## SYNOPSIS + Adds a named-range to an existing Excel worksheet. ## SYNTAX -``` +```text Add-ExcelName [-Range] [[-RangeName] ] [] ``` ## DESCRIPTION + It is often helpful to be able to refer to sets of cells with a name rather than using their co-ordinates; Add-ExcelName sets up these names. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Add-ExcelName -Range $ws.Cells[$dataRange] -RangeName $rangeName ``` -$WS is a worksheet, and $dataRange is a string describing a range of cells - for example "A1:Z10" - which will become a named range, using the name in $rangeName. +$WS is a worksheet, and $dataRange is a string describing a range of cells - for example "A1:Z10" - which will become a named range, using the name in $rangeName. ## PARAMETERS ### -Range + The range of cells to assign as a name. ```yaml @@ -46,7 +50,8 @@ Accept wildcard characters: False ``` ### -RangeName -The name to assign to the range. If the name exists it will be updated to the new range. If no name is specified, the first cell in the range will be used as the name. + +The name to assign to the range. If the name exists it will be updated to the new range. If no name is specified, the first cell in the range will be used as the name. ```yaml Type: String @@ -61,7 +66,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -70,3 +76,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-ExcelTable.md b/mdhelp/en/add-exceltable.md similarity index 91% rename from mdHelp/en/Add-ExcelTable.md rename to mdhelp/en/add-exceltable.md index 200ad0d..8267083 100644 --- a/mdHelp/en/Add-ExcelTable.md +++ b/mdhelp/en/add-exceltable.md @@ -1,22 +1,24 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-ExcelTable ## SYNOPSIS + Adds Tables to Excel workbooks. ## SYNTAX -``` +```text Add-ExcelTable [-Range] [[-TableName] ] [[-TableStyle] ] [-ShowHeader] [-ShowFilter] [-ShowTotal] [[-TotalSettings] ] [-ShowFirstColumn] [-ShowLastColumn] [-ShowRowStripes] [-ShowColumnStripes] [-PassThru] [] ``` ## DESCRIPTION + Unlike named ranges, where the name only needs to be unique within a sheet, Table names must be unique in the workbook. Tables carry formatting and by default have a filter. @@ -26,23 +28,25 @@ The filter, header, totals, first and last column highlights can all be configur ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Add-ExcelTable -Range $ws.Cells[$dataRange] -TableName $TableName ``` $WS is a worksheet, and $dataRange is a string describing a range of cells - for example "A1:Z10". This range which will become a table, named $TableName ### EXAMPLE 2 -``` + +```text PS\> Add-ExcelTable -Range $ws.cells[$($ws.Dimension.address)] -TableStyle Light1 -TableName Musictable -ShowFilter:$false -ShowTotal -ShowFirstColumn ``` -Again $ws is a worksheet, range here is the whole of the active part of the worksheet. -The table style and name are set, the filter is turned off, and a "Totals" row added, and first column is set in bold. +Again $ws is a worksheet, range here is the whole of the active part of the worksheet. The table style and name are set, the filter is turned off, and a "Totals" row added, and first column is set in bold. ## PARAMETERS ### -Range + The range of cells to assign to a table. ```yaml @@ -58,6 +62,7 @@ Accept wildcard characters: False ``` ### -TableName + The name for the Table - this should be unqiue in the Workbook - auto generated names will be used if this is left empty. ```yaml @@ -73,6 +78,7 @@ Accept wildcard characters: False ``` ### -TableStyle + The Style for the table, by default "Medium6" is used ```yaml @@ -89,6 +95,7 @@ Accept wildcard characters: False ``` ### -ShowHeader + By default the header row is shown - it can be turned off with -ShowHeader:$false. ```yaml @@ -104,6 +111,7 @@ Accept wildcard characters: False ``` ### -ShowFilter + By default the filter is enabled - it can be turned off with -ShowFilter:$false. ```yaml @@ -119,6 +127,7 @@ Accept wildcard characters: False ``` ### -ShowTotal + Show total adds a totals row. This does not automatically sum the columns but provides a drop-down in each to select sum, average etc ```yaml @@ -134,7 +143,8 @@ Accept wildcard characters: False ``` ### -TotalSettings -A HashTable in the form ColumnName = "Average"|"Count"|"CountNums"|"Max"|"Min"|"None"|"StdDev"|"Sum"|"Var" - if specified, -ShowTotal is not needed. + +A HashTable in the form ColumnName = "Average"\|"Count"\|"CountNums"\|"Max"\|"Min"\|"None"\|"StdDev"\|"Sum"\|"Var" - if specified, -ShowTotal is not needed. ```yaml Type: Hashtable @@ -149,6 +159,7 @@ Accept wildcard characters: False ``` ### -ShowFirstColumn + Highlights the first column in bold. ```yaml @@ -164,6 +175,7 @@ Accept wildcard characters: False ``` ### -ShowLastColumn + Highlights the last column in bold. ```yaml @@ -179,6 +191,7 @@ Accept wildcard characters: False ``` ### -ShowRowStripes + By default the table formats show striped rows, the can be turned off with -ShowRowStripes:$false ```yaml @@ -194,6 +207,7 @@ Accept wildcard characters: False ``` ### -ShowColumnStripes + Turns on column stripes. ```yaml @@ -209,6 +223,7 @@ Accept wildcard characters: False ``` ### -PassThru + If -PassThru is specified, the table object will be returned to allow additional changes to be made. ```yaml @@ -224,13 +239,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.Table.ExcelTable + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-PivotTable.md b/mdhelp/en/add-pivottable.md similarity index 93% rename from mdHelp/en/Add-PivotTable.md rename to mdhelp/en/add-pivottable.md index 7f4f1cd..f060d9a 100644 --- a/mdHelp/en/Add-PivotTable.md +++ b/mdhelp/en/add-pivottable.md @@ -1,48 +1,53 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-PivotTable ## SYNOPSIS -Adds a PivotTable (and optional PivotChart) to a workbook. + +Adds a PivotTable \(and optional PivotChart\) to a workbook. ## SYNTAX -### ChartbyParams (Default) -``` +### ChartbyParams \(Default\) + +```text Add-PivotTable -PivotTableName [-Address ] [-ExcelPackage ] [-SourceWorkSheet ] [-SourceRange ] [-PivotRows ] [-PivotData ] [-PivotColumns ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTotals ] [-NoTotalsInPivot] [-GroupDateRow ] [-GroupDatePart ] [-GroupNumericRow ] [-GroupNumericMin ] [-GroupNumericMax ] [-GroupNumericInterval ] [-PivotNumberFormat ] [-PivotTableStyle ] [-IncludePivotChart] [-ChartTitle ] [-ChartHeight ] [-ChartWidth ] [-ChartRow ] [-ChartColumn ] [-ChartRowOffSetPixels ] [-ChartColumnOffSetPixels ] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-Activate] [-PassThru] [] ``` ### ChartbyDef -``` + +```text Add-PivotTable -PivotTableName [-Address ] [-ExcelPackage ] [-SourceWorkSheet ] [-SourceRange ] [-PivotRows ] [-PivotData ] [-PivotColumns ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTotals ] [-NoTotalsInPivot] [-GroupDateRow ] [-GroupDatePart ] [-GroupNumericRow ] [-GroupNumericMin ] [-GroupNumericMax ] [-GroupNumericInterval ] [-PivotNumberFormat ] [-PivotTableStyle ] -PivotChartDefinition [-Activate] [-PassThru] [] ``` ## DESCRIPTION + If the PivotTable already exists, the source data will be updated. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $excel = Get-Service | Export-Excel -Path test.xlsx -WorksheetName Services -PassThru -AutoSize -DisplayPropertySet -TableName ServiceTable -Title "Services on $Env:COMPUTERNAME" Add-PivotTable -ExcelPackage $excel -PivotTableName ServiceSummary -SourceRange $excel.Workbook.Worksheets\[1\].Tables\[0\].Address -PivotRows Status -PivotData Name -NoTotalsInPivot -Activate Close-ExcelPackage $excel -Show ``` - This exports data to new workbook and creates a table with the data in it. -The Pivot table is added on its own page, the table created in the first command is used as the source for the PivotTable; which counts the service names in for each Status. +The Pivot table is added on its own page, the table created in the first command is used as the source for the PivotTable; which counts the service names in for each Status. At the end the Pivot page is made active. ### EXAMPLE 2 -``` + +```text PS\> $chartdef = New-ExcelChartDefinition -Title "Gross and net by city and product" -ChartType ColumnClustered ` -Column 11 -Width 500 -Height 360 -YMajorUnit 500 -YMinorUnit 100 -YAxisNumberformat "$#,##0" -LegendPosition Bottom $excel = ConvertFrom-Csv @" @@ -66,12 +71,13 @@ Then it exports some data to an XLSX file and keeps the file open. The next step is to add the pivot table, normally this would be on its own sheet in the workbook, but here -Address is specified to place it beside the data. -The Add-Pivot table is given the chart definition and told to create a tale using the City field to create rows, the Product field to create columns and the data should be the sum of the gross field and the sum of the net field; grand totals for both gross and net are included for rows (Cities) and columns (Products) and the data is explicitly formatted as a currency. +The Add-Pivot table is given the chart definition and told to create a tale using the City field to create rows, the Product field to create columns and the data should be the sum of the gross field and the sum of the net field; grand totals for both gross and net are included for rows \(Cities\) and columns \(Products\) and the data is explicitly formatted as a currency. Note that in the chart definition the number format for the axis does not include any fraction part. ### EXAMPLE 3 -``` + +```text PS> $excel = Convertfrom-csv @" Location,OrderDate,quantity Boston,1/1/2017,100 @@ -103,7 +109,6 @@ Boston,2/18/2018,1000 Close-ExcelPackage $excel -Show ``` - Here the data contains dates formatted as strings using US format. These are converted to DateTime objects before being exported to Excel; the "OrderDate" column is formatted with the local short-date style. @@ -119,6 +124,7 @@ Finally the workbook is saved and shown in Excel. ## PARAMETERS ### -PivotTableName + Name for the new PivotTable - this will be the name of a sheet in the Workbook. ```yaml @@ -134,7 +140,8 @@ Accept wildcard characters: False ``` ### -Address -By default, a PivotTable will be created on its own sheet, but it can be created on an existing sheet by giving the address where the top left corner of the table should go. (Allow two rows for the filter if one is used.) + +By default, a PivotTable will be created on its own sheet, but it can be created on an existing sheet by giving the address where the top left corner of the table should go. \(Allow two rows for the filter if one is used.\) ```yaml Type: ExcelAddressBase @@ -149,6 +156,7 @@ Accept wildcard characters: False ``` ### -ExcelPackage + An Excel-package object for the workbook. ```yaml @@ -164,6 +172,7 @@ Accept wildcard characters: False ``` ### -SourceWorkSheet + Worksheet where the data is found. ```yaml @@ -179,6 +188,7 @@ Accept wildcard characters: False ``` ### -SourceRange + Address range in the worksheet e.g "A10:F20" - the first row must be column names: if not specified the whole sheet will be used. ```yaml @@ -194,6 +204,7 @@ Accept wildcard characters: False ``` ### -PivotRows + Fields to set as rows in the PivotTable. ```yaml @@ -209,6 +220,7 @@ Accept wildcard characters: False ``` ### -PivotData + A hash table in form "FieldName"="Function", where function is one of Average, Count, CountNums, Max, Min, Product, None, StdDev, StdDevP, Sum, Var, VarP. ```yaml @@ -224,6 +236,7 @@ Accept wildcard characters: False ``` ### -PivotColumns + Fields to set as columns in the PivotTable. ```yaml @@ -239,6 +252,7 @@ Accept wildcard characters: False ``` ### -PivotFilter + Fields to use to filter in the PivotTable. ```yaml @@ -254,6 +268,7 @@ Accept wildcard characters: False ``` ### -PivotDataToColumn + If there are multiple data items in a PivotTable, by default they are shown on separate rows; this switch makes them separate columns. ```yaml @@ -269,7 +284,8 @@ Accept wildcard characters: False ``` ### -PivotTotals -Define whether totals should be added to rows, columns neither, or both (the default is both). + +Define whether totals should be added to rows, columns neither, or both \(the default is both\). ```yaml Type: String @@ -284,6 +300,7 @@ Accept wildcard characters: False ``` ### -NoTotalsInPivot + Included for compatibility - equivalent to -PivotTotals "None". ```yaml @@ -299,7 +316,8 @@ Accept wildcard characters: False ``` ### -GroupDateRow -The name of a row field which should be grouped by parts of the date/time (ignored if GroupDateRow is not specified) + +The name of a row field which should be grouped by parts of the date/time \(ignored if GroupDateRow is not specified\) ```yaml Type: String @@ -314,7 +332,8 @@ Accept wildcard characters: False ``` ### -GroupDatePart -The Part(s) of the date to use in the grouping (ignored if GroupDateRow is not specified) + +The Part\(s\) of the date to use in the grouping \(ignored if GroupDateRow is not specified\) ```yaml Type: eDateGroupBy[] @@ -330,7 +349,8 @@ Accept wildcard characters: False ``` ### -GroupNumericRow -The name of a row field which should be grouped by Number (e.g. 0-99, 100-199, 200-299 ) + +The name of a row field which should be grouped by Number \(e.g. 0-99, 100-199, 200-299 \) ```yaml Type: String @@ -345,6 +365,7 @@ Accept wildcard characters: False ``` ### -GroupNumericMin + The starting point for grouping ```yaml @@ -360,6 +381,7 @@ Accept wildcard characters: False ``` ### -GroupNumericMax + The endpoint for grouping ```yaml @@ -375,6 +397,7 @@ Accept wildcard characters: False ``` ### -GroupNumericInterval + The interval for grouping ```yaml @@ -390,6 +413,7 @@ Accept wildcard characters: False ``` ### -PivotNumberFormat + Number format to apply to the data cells in the PivotTable. ```yaml @@ -405,6 +429,7 @@ Accept wildcard characters: False ``` ### -PivotTableStyle + Apply a table style to the PivotTable. ```yaml @@ -421,6 +446,7 @@ Accept wildcard characters: False ``` ### -PivotChartDefinition + Use a chart definition instead of specifying chart settings one by one. ```yaml @@ -436,6 +462,7 @@ Accept wildcard characters: False ``` ### -IncludePivotChart + If specified, a chart will be included. ```yaml @@ -451,6 +478,7 @@ Accept wildcard characters: False ``` ### -ChartTitle + Optional title for the pivot chart, by default the title omitted. ```yaml @@ -466,7 +494,8 @@ Accept wildcard characters: False ``` ### -ChartHeight -Height of the chart in Pixels (400 by default). + +Height of the chart in Pixels \(400 by default\). ```yaml Type: Int32 @@ -481,7 +510,8 @@ Accept wildcard characters: False ``` ### -ChartWidth -Width of the chart in Pixels (600 by default). + +Width of the chart in Pixels \(600 by default\). ```yaml Type: Int32 @@ -496,7 +526,8 @@ Accept wildcard characters: False ``` ### -ChartRow -Cell position of the top left corner of the chart, there will be this number of rows above the top edge of the chart (default is 0, chart starts at top edge of row 1). + +Cell position of the top left corner of the chart, there will be this number of rows above the top edge of the chart \(default is 0, chart starts at top edge of row 1\). ```yaml Type: Int32 @@ -511,7 +542,8 @@ Accept wildcard characters: False ``` ### -ChartColumn -Cell position of the top left corner of the chart, there will be this number of cells to the left of the chart (default is 4, chart starts at left edge of column E). + +Cell position of the top left corner of the chart, there will be this number of cells to the left of the chart \(default is 4, chart starts at left edge of column E\). ```yaml Type: Int32 @@ -526,6 +558,7 @@ Accept wildcard characters: False ``` ### -ChartRowOffSetPixels + Vertical offset of the chart from the cell corner. ```yaml @@ -541,6 +574,7 @@ Accept wildcard characters: False ``` ### -ChartColumnOffSetPixels + Horizontal offset of the chart from the cell corner. ```yaml @@ -556,6 +590,7 @@ Accept wildcard characters: False ``` ### -ChartType + Type of chart; defaults to "Pie". ```yaml @@ -572,6 +607,7 @@ Accept wildcard characters: False ``` ### -NoLegend + If specified hides the chart legend. ```yaml @@ -587,6 +623,7 @@ Accept wildcard characters: False ``` ### -ShowCategory + If specified attaches the category to slices in a pie chart : not supported on all chart types, this may give errors if applied to an unsupported type. ```yaml @@ -602,6 +639,7 @@ Accept wildcard characters: False ``` ### -ShowPercent + If specified attaches percentages to slices in a pie chart. ```yaml @@ -617,6 +655,7 @@ Accept wildcard characters: False ``` ### -Activate + If there is already content in the workbook the sheet with the PivotTable will not be active UNLESS Activate is specified. ```yaml @@ -632,6 +671,7 @@ Accept wildcard characters: False ``` ### -PassThru + Return the PivotTable so it can be customized. ```yaml @@ -647,13 +687,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.Table.PivotTable.ExcelPivotTable + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Add-WorkSheet.md b/mdhelp/en/add-worksheet.md similarity index 85% rename from mdHelp/en/Add-WorkSheet.md rename to mdhelp/en/add-worksheet.md index 9586c2c..33bfa54 100644 --- a/mdHelp/en/Add-WorkSheet.md +++ b/mdhelp/en/add-worksheet.md @@ -1,30 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Add-WorkSheet ## SYNOPSIS + Adds a worksheet to an existing workbook. ## SYNTAX ### Package -``` + +```text Add-WorkSheet [-ExcelPackage] [-WorksheetName ] [-ClearSheet] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-Activate] [-CopySource ] [-NoClobber] [] ``` ### WorkBook -``` + +```text Add-WorkSheet -ExcelWorkbook [-WorksheetName ] [-ClearSheet] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-Activate] [-CopySource ] [-NoClobber] [] ``` ## DESCRIPTION -If the named worksheet already exists, the -Clearsheet parameter decides whether it should be deleted and a new one returned, -or if not specified the existing sheet will be returned. + +If the named worksheet already exists, the -Clearsheet parameter decides whether it should be deleted and a new one returned, or if not specified the existing sheet will be returned. By default the sheet is created at the end of the work book, the -MoveXXXX switches allow the sheet to be \[re\]positioned at the start or before or after another sheet. @@ -33,15 +36,16 @@ A new sheet will only be made the default sheet when excel opens if -Activate is ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $WorksheetActors = $ExcelPackage | Add-WorkSheet -WorkSheetname Actors ``` -$ExcelPackage holds an Excel package object (returned by Open-ExcelPackage, or Export-Excel -passthru). -This command will add a sheet named 'Actors', or return the sheet if it exists, and the result is stored in $WorkSheetActors. +$ExcelPackage holds an Excel package object \(returned by Open-ExcelPackage, or Export-Excel -passthru\). This command will add a sheet named 'Actors', or return the sheet if it exists, and the result is stored in $WorkSheetActors. ### EXAMPLE 2 -``` + +```text PS\> $WorksheetActors = Add-WorkSheet -ExcelPackage $ExcelPackage -WorkSheetname "Actors" -ClearSheet -MoveToStart ``` @@ -52,7 +56,8 @@ If the 'Actors' sheet already exists it is deleted and re-created. The new sheet will be created last in the workbook, and -MoveToStart Moves it to the start. ### EXAMPLE 3 -``` + +```text PS\> $null = Add-WorkSheet -ExcelWorkbook $wb -WorkSheetname $DestinationName -CopySource $sourceWs -Activate ``` @@ -63,6 +68,7 @@ Here the new copy of the data is made the active sheet when the workbook is open ## PARAMETERS ### -ExcelPackage + An object representing an Excel Package. ```yaml @@ -78,6 +84,7 @@ Accept wildcard characters: False ``` ### -ExcelWorkbook + An Excel Workbook to which the Worksheet will be added - a Package contains one Workbook, so you can use whichever fits at the time. ```yaml @@ -93,6 +100,7 @@ Accept wildcard characters: False ``` ### -WorksheetName + The name of the worksheet, 'Sheet1' by default. ```yaml @@ -108,6 +116,7 @@ Accept wildcard characters: False ``` ### -ClearSheet + If the worksheet already exists, by default it will returned, unless -ClearSheet is specified in which case it will be deleted and re-created. ```yaml @@ -123,6 +132,7 @@ Accept wildcard characters: False ``` ### -MoveToStart + If specified, the worksheet will be moved to the start of the workbook. MoveToStart takes precedence over MoveToEnd, Movebefore and MoveAfter if more than one is specified. @@ -140,9 +150,10 @@ Accept wildcard characters: False ``` ### -MoveToEnd + If specified, the worksheet will be moved to the end of the workbook. -(This is the default position for newly created sheets, but it can be used to move existing sheets.) +\(This is the default position for newly created sheets, but it can be used to move existing sheets.\) ```yaml Type: SwitchParameter @@ -157,7 +168,8 @@ Accept wildcard characters: False ``` ### -MoveBefore -If specified, the worksheet will be moved before the nominated one (which can be an index starting from 1, or a name). + +If specified, the worksheet will be moved before the nominated one \(which can be an index starting from 1, or a name\). MoveBefore takes precedence over MoveAfter if both are specified. @@ -174,9 +186,10 @@ Accept wildcard characters: False ``` ### -MoveAfter -If specified, the worksheet will be moved after the nominated one (which can be an index starting from 1, or a name or *). -If * is used, the worksheet names will be examined starting with the first one, and the sheet placed after the last sheet which comes before it alphabetically. +If specified, the worksheet will be moved after the nominated one \(which can be an index starting from 1, or a name or \*\). + +If \* is used, the worksheet names will be examined starting with the first one, and the sheet placed after the last sheet which comes before it alphabetically. ```yaml Type: Object @@ -191,6 +204,7 @@ Accept wildcard characters: False ``` ### -Activate + If there is already content in the workbook the new sheet will not be active UNLESS Activate is specified. ```yaml @@ -206,6 +220,7 @@ Accept wildcard characters: False ``` ### -CopySource + If worksheet is provided as a copy source the new worksheet will be a copy of it. The source can be in the same workbook, or in a different file. ```yaml @@ -221,6 +236,7 @@ Accept wildcard characters: False ``` ### -NoClobber + Ignored but retained for backwards compatibility. ```yaml @@ -236,13 +252,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.ExcelWorksheet + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Close-ExcelPackage.md b/mdhelp/en/close-excelpackage.md similarity index 89% rename from mdHelp/en/Close-ExcelPackage.md rename to mdhelp/en/close-excelpackage.md index 0bab0b6..d7a8305 100644 --- a/mdHelp/en/Close-ExcelPackage.md +++ b/mdhelp/en/close-excelpackage.md @@ -1,23 +1,25 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Close-ExcelPackage ## SYNOPSIS + Closes an Excel Package, saving, saving under a new name or abandoning changes and opening the file in Excel as required. ## SYNTAX -``` +```text Close-ExcelPackage [-ExcelPackage] [-Show] [-NoSave] [[-SaveAs] ] [[-Password] ] [-Calculate] [] ``` ## DESCRIPTION -When working with an ExcelPackage object, the Workbook is held in memory and not saved until the .Save() method of the package is called. + +When working with an ExcelPackage object, the Workbook is held in memory and not saved until the .Save\(\) method of the package is called. Close-ExcelPackage saves and disposes of the Package object. @@ -26,14 +28,16 @@ It can be called with -NoSave to abandon the file without saving, with a new "Sa ## EXAMPLES ### EXAMPLE 1 -``` + +```text Close-ExcelPackage -show $excel ``` $excel holds a package object, this saves the workbook and loads it into Excel. ### EXAMPLE 2 -``` + +```text Close-ExcelPackage -NoSave $excel ``` @@ -42,6 +46,7 @@ $excel holds a package object, this disposes of it without writing it to disk. ## PARAMETERS ### -ExcelPackage + Package to close. ```yaml @@ -57,6 +62,7 @@ Accept wildcard characters: False ``` ### -Show + Open the file in Excel. ```yaml @@ -72,6 +78,7 @@ Accept wildcard characters: False ``` ### -NoSave + Abandon the file without saving. ```yaml @@ -87,7 +94,8 @@ Accept wildcard characters: False ``` ### -SaveAs -Save file with a new name (ignored if -NoSave Specified). + +Save file with a new name \(ignored if -NoSave Specified\). ```yaml Type: Object @@ -102,6 +110,7 @@ Accept wildcard characters: False ``` ### -Password + Password to protect the file. ```yaml @@ -117,6 +126,7 @@ Accept wildcard characters: False ``` ### -Calculate + Attempt to recalculation the workbook before saving ```yaml @@ -132,7 +142,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -141,3 +152,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Compare-WorkSheet.md b/mdhelp/en/compare-worksheet.md similarity index 87% rename from mdHelp/en/Compare-WorkSheet.md rename to mdhelp/en/compare-worksheet.md index 429ee2f..430f8d2 100644 --- a/mdHelp/en/Compare-WorkSheet.md +++ b/mdhelp/en/compare-worksheet.md @@ -1,39 +1,43 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Compare-WorkSheet ## SYNOPSIS + Compares two worksheets and shows the differences. ## SYNTAX -### True (Default) -``` +### True \(Default\) + +```text Compare-WorkSheet [-Referencefile] [-Differencefile] [-WorkSheetName ] [-Property ] [-ExcludeProperty ] [-Startrow ] [-AllDataBackgroundColor ] [-BackgroundColor ] [-TabColor ] [-Key ] [-FontColor ] [-Show] [-GridView] [-PassThru] [-IncludeEqual] [-ExcludeDifferent] [] ``` ### B -``` + +```text Compare-WorkSheet [-Referencefile] [-Differencefile] [-WorkSheetName ] [-Property ] [-ExcludeProperty ] -Headername [-Startrow ] [-AllDataBackgroundColor ] [-BackgroundColor ] [-TabColor ] [-Key ] [-FontColor ] [-Show] [-GridView] [-PassThru] [-IncludeEqual] [-ExcludeDifferent] [] ``` ### C -``` + +```text Compare-WorkSheet [-Referencefile] [-Differencefile] [-WorkSheetName ] [-Property ] [-ExcludeProperty ] [-NoHeader] [-Startrow ] [-AllDataBackgroundColor ] [-BackgroundColor ] [-TabColor ] [-Key ] [-FontColor ] [-Show] [-GridView] [-PassThru] [-IncludeEqual] [-ExcludeDifferent] [] ``` ## DESCRIPTION + This command takes two file names, one or two worksheet names and a name for a "key" column. -It reads the worksheet from each file and decides the column names and builds a hashtable of the key-column values and the -rows in which they appear. +It reads the worksheet from each file and decides the column names and builds a hashtable of the key-column values and the rows in which they appear. -It then uses PowerShell's Compare-Object command to compare the sheets (explicitly checking all the column names which have not been excluded). +It then uses PowerShell's Compare-Object command to compare the sheets \(explicitly checking all the column names which have not been excluded\). For the difference rows it adds the row number for the key of that row - we have to add the key after doing the comparison, otherwise identical rows at different positions in the file will not be considered a match. @@ -44,45 +48,50 @@ If -BackgroundColor is specified the difference rows will be changed to that bac ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Compare-WorkSheet -Referencefile 'Server56.xlsx' -Differencefile 'Server57.xlsx' -WorkSheetName Products -key IdentifyingNumber -ExcludeProperty Install* | Format-Table ``` -The two workbooks in this example contain the result of redirecting a subset of properties from Get-WmiObject -Class win32_product to Export-Excel. +The two workbooks in this example contain the result of redirecting a subset of properties from Get-WmiObject -Class win32\_product to Export-Excel. -The command compares the "Products" pages in the two workbooks, but we don't want to register a difference if the software was installed on a different date or from a different place, and excluding Install* removes InstallDate and InstallSource. +The command compares the "Products" pages in the two workbooks, but we don't want to register a difference if the software was installed on a different date or from a different place, and excluding Install\* removes InstallDate and InstallSource. This data doesn't have a "Name" column, so we specify the "IdentifyingNumber" column as the key. The results will be presented as a table. ### EXAMPLE 2 -``` + +```text PS\> Compare-WorkSheet "Server54.xlsx" "Server55.xlsx" -WorkSheetName Services -GridView ``` -This time two workbooks contain the result of redirecting the command Get-WmiObject -Class win32_service to Export-Excel. +This time two workbooks contain the result of redirecting the command Get-WmiObject -Class win32\_service to Export-Excel. -Here the -Differencefile and -Referencefile parameter switches are assumed and the default setting for -Key ("Name") works for services. +Here the -Differencefile and -Referencefile parameter switches are assumed and the default setting for -Key \("Name"\) works for services. This will display the differences between the "Services" sheets using a grid view ### EXAMPLE 3 -``` + +```text PS\> Compare-WorkSheet 'Server54.xlsx' 'Server55.xlsx' -WorkSheetName Services -BackgroundColor lightGreen ``` This version of the command outputs the differences between the "services" pages and highlights any different rows in the spreadsheet files. ### EXAMPLE 4 -``` + +```text PS\> Compare-WorkSheet 'Server54.xlsx' 'Server55.xlsx' -WorkSheetName Services -BackgroundColor lightGreen -FontColor Red -Show ``` -This example builds on the previous one: this time where two changed rows have the value in the "Name" column (the default value for -Key), this version adds highlighting of the changed cells in red; and then opens the Excel file. +This example builds on the previous one: this time where two changed rows have the value in the "Name" column \(the default value for -Key\), this version adds highlighting of the changed cells in red; and then opens the Excel file. ### EXAMPLE 5 -``` + +```text PS\> Compare-WorkSheet 'Pester-tests.xlsx' 'Pester-tests.xlsx' -WorkSheetName 'Server1','Server2' -Property "full Description","Executed","Result" -Key "full Description" ``` @@ -91,7 +100,8 @@ This time the reference file and the difference file are the same file and two d Because the tests include the machine name and time the test was run, the command specifies that a limited set of columns should be used. ### EXAMPLE 6 -``` + +```text PS\> Compare-WorkSheet 'Server54.xlsx' 'Server55.xlsx' -WorkSheetName general -Startrow 2 -Headername Label,value -Key Label -GridView -ExcludeDifferent ``` @@ -104,7 +114,8 @@ This time we are interested in those rows which are the same in both sheets, and Note that grid view works best when the number of columns is small. ### EXAMPLE 7 -``` + +```text PS\>Compare-WorkSheet 'Server1.xlsx' 'Server2.xlsx' -WorkSheetName general -Startrow 2 -Headername Label,value -Key Label -BackgroundColor White -Show -AllDataBackgroundColor LightGray ``` @@ -115,6 +126,7 @@ Only the unchanged rows are highlighted. ## PARAMETERS ### -Referencefile + First file to compare. ```yaml @@ -130,6 +142,7 @@ Accept wildcard characters: False ``` ### -Differencefile + Second file to compare. ```yaml @@ -145,7 +158,8 @@ Accept wildcard characters: False ``` ### -WorkSheetName -Name(s) of worksheets to compare. + +Name\(s\) of worksheets to compare. ```yaml Type: Object @@ -160,7 +174,8 @@ Accept wildcard characters: False ``` ### -Property -Properties to include in the comparison - supports wildcards, default is "*". + +Properties to include in the comparison - supports wildcards, default is "\*". ```yaml Type: Object @@ -175,6 +190,7 @@ Accept wildcard characters: False ``` ### -ExcludeProperty + Properties to exclude from the comparison - supports wildcards. ```yaml @@ -190,6 +206,7 @@ Accept wildcard characters: False ``` ### -Headername + Specifies custom property names to use, instead of the values defined in the starting row of the sheet. ```yaml @@ -205,7 +222,8 @@ Accept wildcard characters: False ``` ### -NoHeader -Automatically generate property names (P1, P2, P3 ...) instead of the using the values the starting row of the sheet. + +Automatically generate property names \(P1, P2, P3 ...\) instead of the using the values the starting row of the sheet. ```yaml Type: SwitchParameter @@ -220,6 +238,7 @@ Accept wildcard characters: False ``` ### -Startrow + The row from where we start to import data: all rows above the start row are disregarded. By default, this is the first row. ```yaml @@ -235,6 +254,7 @@ Accept wildcard characters: False ``` ### -AllDataBackgroundColor + If specified, highlights all the cells - so you can make Equal cells one color, and Different cells another. ```yaml @@ -250,6 +270,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + If specified, highlights the rows with differences. ```yaml @@ -265,7 +286,8 @@ Accept wildcard characters: False ``` ### -TabColor -If specified identifies the tabs which contain difference rows (ignored if -BackgroundColor is omitted). + +If specified identifies the tabs which contain difference rows \(ignored if -BackgroundColor is omitted\). ```yaml Type: Object @@ -280,6 +302,7 @@ Accept wildcard characters: False ``` ### -Key + Name of a column which is unique and will be used to add a row to the DIFF object, defaults to "Name". ```yaml @@ -295,6 +318,7 @@ Accept wildcard characters: False ``` ### -FontColor + If specified, highlights the DIFF columns in rows which have the same key. ```yaml @@ -310,7 +334,8 @@ Accept wildcard characters: False ``` ### -Show -If specified, opens the Excel workbooks instead of outputting the diff to the console (unless -PassThru is also specified). + +If specified, opens the Excel workbooks instead of outputting the diff to the console \(unless -PassThru is also specified\). ```yaml Type: SwitchParameter @@ -325,8 +350,8 @@ Accept wildcard characters: False ``` ### -GridView -If specified, the command tries to the show the DIFF in a Grid-View and not on the console (unless-PassThru is also specified). -This works best with few columns selected, and requires a key. + +If specified, the command tries to the show the DIFF in a Grid-View and not on the console \(unless-PassThru is also specified\). This works best with few columns selected, and requires a key. ```yaml Type: SwitchParameter @@ -341,6 +366,7 @@ Accept wildcard characters: False ``` ### -PassThru + If specified a full set of DIFF data is returned without filtering to the specified properties. ```yaml @@ -356,6 +382,7 @@ Accept wildcard characters: False ``` ### -IncludeEqual + If specified the result will include equal rows as well. By default only different rows are returned. ```yaml @@ -371,6 +398,7 @@ Accept wildcard characters: False ``` ### -ExcludeDifferent + If specified, the result includes only the rows where both are equal. ```yaml @@ -386,7 +414,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -395,3 +424,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Convert-ExcelRangeToImage.md b/mdhelp/en/convert-excelrangetoimage.md similarity index 81% rename from mdHelp/en/Convert-ExcelRangeToImage.md rename to mdhelp/en/convert-excelrangetoimage.md index ba09ea5..543d7ea 100644 --- a/mdHelp/en/Convert-ExcelRangeToImage.md +++ b/mdhelp/en/convert-excelrangetoimage.md @@ -1,36 +1,41 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Convert-ExcelRangeToImage ## SYNOPSIS + Gets the specified part of an Excel file and exports it as an image ## SYNTAX -``` +```text Convert-ExcelRangeToImage [-Path] [[-workSheetname] ] [-range] [[-destination] ] [-show] [] ``` ## DESCRIPTION + Excel allows charts to be exported directly to a file, but it can't do this with the rest of a sheet. To work round this, this function * Opens a copy of Excel and loads a file * Selects a worksheet and then a range of cells in that worksheet * Copies the select to the clipboard -* Saves the clipboard contents as an image file (it will save as .JPG unless the file name ends .BMP or .PNG) -* Copies a single cell to the clipboard (to prevent the "you have put a lot in the clipboard" message appearing) +* Saves the clipboard contents as an image file \(it will save as .JPG unless the file name ends .BMP or .PNG\) +* Copies a single cell to the clipboard \(to prevent the "you have put a lot in the clipboard" message appearing\) * Closes Excel -Unlike most functions in the module it needs a local copy of Excel to be installed. -## EXAMPLES + + Unlike most functions in the module it needs a local copy of Excel to be installed. + + **EXAMPLES** ## PARAMETERS ### -Path + Path to the Excel file ```yaml @@ -46,6 +51,7 @@ Accept wildcard characters: False ``` ### -WorkSheetname + Worksheet name - if none is specified "Sheet1" will be assumed ```yaml @@ -61,6 +67,7 @@ Accept wildcard characters: False ``` ### -Range + Range of cells within the sheet, e.g "A1:Z99" ```yaml @@ -76,6 +83,7 @@ Accept wildcard characters: False ``` ### -Destination + A bmp, png or jpg file where the result will be saved ```yaml @@ -91,6 +99,7 @@ Accept wildcard characters: False ``` ### -Show + If specified opens the image in the default viewer. ```yaml @@ -106,7 +115,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -115,3 +125,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/ConvertFrom-ExcelSheet.md b/mdhelp/en/convertfrom-excelsheet.md similarity index 66% rename from mdHelp/en/ConvertFrom-ExcelSheet.md rename to mdhelp/en/convertfrom-excelsheet.md index c0c2b8a..688d0d2 100644 --- a/mdHelp/en/ConvertFrom-ExcelSheet.md +++ b/mdhelp/en/convertfrom-excelsheet.md @@ -1,53 +1,51 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # ConvertFrom-ExcelSheet ## SYNOPSIS + Exports Sheets from Excel Workbooks to CSV files. ## SYNTAX -``` +```text ConvertFrom-ExcelSheet [-Path] [[-OutputPath] ] [[-SheetName] ] [[-Encoding] ] [[-Extension] ] [[-Delimiter] ] [[-Property] ] [[-ExcludeProperty] ] [-Append] [[-AsText] ] [] ``` ## DESCRIPTION -This command provides a convenient way to run Import-Excel @ImportParameters | Select-Object @selectParameters | export-Csv @ ExportParameters -It can take the parameters -AsText , as used in Import-Excel, )Properties & -ExcludeProperties as used in Select-Object and --Append, -Delimiter and -Encoding as used in Export-CSV +This command provides a convenient way to run Import-Excel @ImportParameters \| Select-Object @selectParameters \| export-Csv @ ExportParameters It can take the parameters -AsText , as used in Import-Excel, \)Properties & -ExcludeProperties as used in Select-Object and -Append, -Delimiter and -Encoding as used in Export-CSV ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> ConvertFrom-ExcelSheet Path .\__tests__\First10Races.xlsx -OutputPath .. -AsText GridPosition,date ``` -First10Races.xlsx contains information about Motor races. The race date and grid (starting) position are stored with custom formats. -The command specifies the path to the file, and the directory to create the output file, and specifies that the columns "GridPosition" and "Date" should be treated as text to preserve their formatting +First10Races.xlsx contains information about Motor races. The race date and grid \(starting\) position are stored with custom formats. The command specifies the path to the file, and the directory to create the output file, and specifies that the columns "GridPosition" and "Date" should be treated as text to preserve their formatting ### Example 2 -```powershell + +```text PS C:\> ConvertFrom-ExcelSheet Path .\__tests__\First10Races.xlsx -OutputPath .. -AsText "GridPosition" -Property driver, @{n="date"; e={[datetime]::FromOADate($_.Date).tostring("#MM/dd/yyyy#")}} , FinishPosition, GridPosition ``` -This uses the same file as example 1. Because the race date has a custom format, it imports as a number, -The requirement is to create a CSV file with the Driver, a specially formatted Date, FinishPostion and GridPostion (keeping its custom formatting). -The command specifies the path to the file, and the directory to create the output file, specifies that the column "GridPosition" should be treated as text instead of a number, and the output properties should be Driver, a calculated "date" field, FinishPosition and GridPsition. FromOADate converts the dates used by Excel (Days since Jan 1 1900) to a datetime object. - +This uses the same file as example 1. Because the race date has a custom format, it imports as a number, The requirement is to create a CSV file with the Driver, a specially formatted Date, FinishPostion and GridPostion \(keeping its custom formatting\). The command specifies the path to the file, and the directory to create the output file, specifies that the column "GridPosition" should be treated as text instead of a number, and the output properties should be Driver, a calculated "date" field, FinishPosition and GridPsition. FromOADate converts the dates used by Excel \(Days since Jan 1 1900\) to a datetime object. ## PARAMETERS ### -Append -Use this parameter to have the export add output to the end of the file. Without this parameter, the command replaces the file contents without warning. + +Use this parameter to have the export add output to the end of the file. Without this parameter, the command replaces the file contents without warning. ```yaml Type: SwitchParameter @@ -62,7 +60,8 @@ Accept wildcard characters: False ``` ### -AsText -AsText allows selected columns to be returned as the text displayed in their cells, instead of their value. (* is supported as a wildcard.) + +AsText allows selected columns to be returned as the text displayed in their cells, instead of their value. \(\* is supported as a wildcard.\) ```yaml Type: String[] @@ -77,7 +76,8 @@ Accept wildcard characters: False ``` ### -AsDate -Not all date formats are recognized as indicating the number in the cell represents a date AsDate forces the number which would be returned to be converted to a date. (* is supported as a wildcard.) + +Not all date formats are recognized as indicating the number in the cell represents a date AsDate forces the number which would be returned to be converted to a date. \(\* is supported as a wildcard.\) ```yaml Type: String[] @@ -92,6 +92,7 @@ Accept wildcard characters: False ``` ### -Delimiter + Selects , or ; as the delimeter for the exported data - if not specified , is used by default. ```yaml @@ -108,8 +109,8 @@ Accept wildcard characters: False ``` ### -Encoding -Sets the text encoding for the output data file; UTF8 bu default +Sets the text encoding for the output data file; UTF8 bu default ```yaml Type: Encoding @@ -124,8 +125,8 @@ Accept wildcard characters: False ``` ### -ExcludeProperty - Specifies the properties that to exclude from the export. Wildcards are permitted. This parameter is effective only when the command also includes the Property parameter. +Specifies the properties that to exclude from the export. Wildcards are permitted. This parameter is effective only when the command also includes the Property parameter. ```yaml Type: Object @@ -140,8 +141,8 @@ Accept wildcard characters: False ``` ### -Extension -Sets the file extension for the exported data, defaults to CSV +Sets the file extension for the exported data, defaults to CSV ```yaml Type: String @@ -157,7 +158,8 @@ Accept wildcard characters: False ``` ### -OutputPath -The directory where the output file(s) will be created. The file name(s) will match the name of the workbook page which contained the data. + +The directory where the output file\(s\) will be created. The file name\(s\) will match the name of the workbook page which contained the data. ```yaml Type: String @@ -172,6 +174,7 @@ Accept wildcard characters: False ``` ### -Path + The path to the .XLSX file which will be exported. ```yaml @@ -187,8 +190,8 @@ Accept wildcard characters: False ``` ### -Property -Specifies the properties to select. Wildcards are permitted - the default is "*". -The value of the Property parameter can be a new calculated property, and follows the same pattern as Select-Item + +Specifies the properties to select. Wildcards are permitted - the default is "\*". The value of the Property parameter can be a new calculated property, and follows the same pattern as Select-Item ```yaml Type: Object @@ -203,6 +206,7 @@ Accept wildcard characters: False ``` ### -SheetName + The name of a sheet to export, or a regular expression which is used to identify sheets ```yaml @@ -218,7 +222,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -227,6 +232,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/ConvertFrom-ExcelToSQLInsert.md b/mdhelp/en/convertfrom-exceltosqlinsert.md similarity index 76% rename from mdHelp/en/ConvertFrom-ExcelToSQLInsert.md rename to mdhelp/en/convertfrom-exceltosqlinsert.md index b178c1a..9190942 100644 --- a/mdHelp/en/ConvertFrom-ExcelToSQLInsert.md +++ b/mdhelp/en/convertfrom-exceltosqlinsert.md @@ -1,28 +1,31 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # ConvertFrom-ExcelToSQLInsert ## SYNOPSIS + Generate SQL insert statements from Excel spreadsheet. ## SYNTAX -``` +```text ConvertFrom-ExcelToSQLInsert [-TableName] [-Path] [[-WorkSheetname] ] [[-StartRow] ] [[-Header] ] [-NoHeader] [-DataOnly] [-ConvertEmptyStringsToNull] [-UseMSSQLSyntax] [] ``` ## DESCRIPTION + Generate SQL insert statements from Excel spreadsheet. ## EXAMPLES ### EXAMPLE 1 -``` + +```text Generate SQL insert statements from Movies.xlsx file, leaving blank cells as empty strings: ---------------------------------------------------------- @@ -44,7 +47,8 @@ INSERT INTO Movies ('Movie Name', 'Year', 'Rating') Values('The Avengers', '2012 ``` ### EXAMPLE 2 -``` + +```text Generate SQL insert statements from Movies.xlsx file, specify NULL instead of an empty string. ---------------------------------------------------------- @@ -68,6 +72,7 @@ INSERT INTO Movies ('Movie Name', 'Year', 'Rating') Values('The Avengers', '2012 ## PARAMETERS ### -TableName + Name of the target database table. ```yaml @@ -83,8 +88,8 @@ Accept wildcard characters: False ``` ### -Path -Path to an existing .XLSX file -This parameter is passed to Import-Excel as is. + +Path to an existing .XLSX file This parameter is passed to Import-Excel as is. ```yaml Type: Object @@ -99,9 +104,8 @@ Accept wildcard characters: False ``` ### -WorkSheetname -Specifies the name of the worksheet in the Excel workbook to import. -By default, if no name is provided, the first worksheet will be imported. -This parameter is passed to Import-Excel as is. + +Specifies the name of the worksheet in the Excel workbook to import. By default, if no name is provided, the first worksheet will be imported. This parameter is passed to Import-Excel as is. ```yaml Type: Object @@ -116,10 +120,8 @@ Accept wildcard characters: False ``` ### -StartRow -The row from where we start to import data, all rows above the StartRow are disregarded. -By default this is the first row. -When the parameters '-NoHeader' and '-HeaderName' are not provided, this row will contain the column headers that will be used as property names. -When one of both parameters are provided, the property names are automatically created and this row will be treated as a regular row containing data. + +The row from where we start to import data, all rows above the StartRow are disregarded. By default this is the first row. When the parameters '-NoHeader' and '-HeaderName' are not provided, this row will contain the column headers that will be used as property names. When one of both parameters are provided, the property names are automatically created and this row will be treated as a regular row containing data. ```yaml Type: Int32 @@ -134,10 +136,8 @@ Accept wildcard characters: False ``` ### -Header -Specifies custom property names to use, instead of the values defined in the column headers of the TopRow. -If you provide fewr header names than there is data in the worksheet, then only the data with a corresponding header name will be imported and the data without header name will be disregarded. -If you provide more header names than there is data in the worksheet, then all data will be imported and all objects will have all the property names you defined in the header names. -As such, the last properties will be blank as there is no data for them. + +Specifies custom property names to use, instead of the values defined in the column headers of the TopRow. If you provide fewr header names than there is data in the worksheet, then only the data with a corresponding header name will be imported and the data without header name will be disregarded. If you provide more header names than there is data in the worksheet, then all data will be imported and all objects will have all the property names you defined in the header names. As such, the last properties will be blank as there is no data for them. ```yaml Type: String[] @@ -152,8 +152,8 @@ Accept wildcard characters: False ``` ### -NoHeader -Automatically generate property names (P1, P2, P3, ..) instead of the ones defined in the column headers of the TopRow. -This switch is best used when you want to import the complete worksheet 'as is' and are not concerned with the property names. + +Automatically generate property names \(P1, P2, P3, ..\) instead of the ones defined in the column headers of the TopRow. This switch is best used when you want to import the complete worksheet 'as is' and are not concerned with the property names. ```yaml Type: SwitchParameter @@ -168,6 +168,7 @@ Accept wildcard characters: False ``` ### -DataOnly + Import only rows and columns that contain data, empty rows and empty columns are not imported. ```yaml @@ -183,8 +184,8 @@ Accept wildcard characters: False ``` ### -ConvertEmptyStringsToNull -If specified, cells without any data are replaced with NULL, instead of an empty string. -This is to address behviors in certain DBMS where an empty string is insert as 0 for INT column, instead of a NULL value. + +If specified, cells without any data are replaced with NULL, instead of an empty string. This is to address behviors in certain DBMS where an empty string is insert as 0 for INT column, instead of a NULL value. ```yaml Type: SwitchParameter @@ -199,7 +200,6 @@ Accept wildcard characters: False ``` ### -UseMSSQLSyntax -{{ Fill UseMSSQLSyntax Description }} ```yaml Type: SwitchParameter @@ -214,7 +214,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -223,3 +224,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Copy-ExcelWorkSheet.md b/mdhelp/en/copy-excelworksheet.md similarity index 64% rename from mdHelp/en/Copy-ExcelWorkSheet.md rename to mdhelp/en/copy-excelworksheet.md index 85f9a89..db9bbb2 100644 --- a/mdHelp/en/Copy-ExcelWorkSheet.md +++ b/mdhelp/en/copy-excelworksheet.md @@ -1,68 +1,65 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Copy-ExcelWorkSheet ## SYNOPSIS + Copies a worksheet between workbooks or within the same workbook. ## SYNTAX -``` +```text Copy-ExcelWorkSheet [-SourceObject] [[-SourceWorkSheet] ] [-DestinationWorkbook] [[-DestinationWorksheet] ] [-Show] [] ``` ## DESCRIPTION -Copy-ExcelWorkSheet takes a Source object which is either a worksheet, -or a package, Workbook or path, in which case the source worksheet can be specified -by name or number (starting from 1). -The destination worksheet can be explicitly named, or will follow the name of the source if no name is specified. -The Destination workbook can be given as the path to an XLSx file, an ExcelPackage object or an ExcelWorkbook object. + +Copy-ExcelWorkSheet takes a Source object which is either a worksheet, or a package, Workbook or path, in which case the source worksheet can be specified by name or number \(starting from 1\). The destination worksheet can be explicitly named, or will follow the name of the source if no name is specified. The Destination workbook can be given as the path to an XLSx file, an ExcelPackage object or an ExcelWorkbook object. ## EXAMPLES ### EXAMPLE 1 -``` + +```text Copy-ExcelWorkSheet -SourceWorkbook Test1.xlsx -DestinationWorkbook Test2.xlsx ``` -This is the simplest version of the command: no source worksheet is specified so Copy-ExcelWorksheet uses the first sheet in the workbook -No Destination sheet is specified so the new worksheet will be the same as the one which is being copied. +This is the simplest version of the command: no source worksheet is specified so Copy-ExcelWorksheet uses the first sheet in the workbook No Destination sheet is specified so the new worksheet will be the same as the one which is being copied. ### EXAMPLE 2 -``` + +```text Copy-ExcelWorkSheet -SourceWorkbook Server1.xlsx -sourceWorksheet "Settings" -DestinationWorkbook Settings.xlsx -DestinationWorksheet "Server1" ``` Here the Settings page from Server1's workbook is copied to the 'Server1" page of a "Settings" workbook. ### EXAMPLE 3 -``` + +```text $excel = Open-ExcelPackage .\test.xlsx ``` -C:\\\> Copy-ExcelWorkSheet -SourceWorkbook $excel -SourceWorkSheet "first" -DestinationWorkbook $excel -Show -DestinationWorksheet Duplicate -This opens the workbook test.xlsx and copies the worksheet named "first" to a new worksheet named "Duplicate", -because -Show is specified the file is saved and opened in Excel +C:\> Copy-ExcelWorkSheet -SourceWorkbook $excel -SourceWorkSheet "first" -DestinationWorkbook $excel -Show -DestinationWorksheet Duplicate This opens the workbook test.xlsx and copies the worksheet named "first" to a new worksheet named "Duplicate", because -Show is specified the file is saved and opened in Excel ### EXAMPLE 4 -``` + +```text $excel = Open-ExcelPackage .\test.xlsx ``` -C:\\\> Copy-ExcelWorkSheet -SourceWorkbook $excel -SourceWorkSheet 1 -DestinationWorkbook $excel -DestinationWorksheet Duplicate -C:\\\> Close-ExcelPackage $excel -This is almost the same as the previous example, except source sheet is specified by position rather than name and -because -Show is not specified, so other steps can be carried using the package object, at the end the file is saved by Close-ExcelPackage +C:\> Copy-ExcelWorkSheet -SourceWorkbook $excel -SourceWorkSheet 1 -DestinationWorkbook $excel -DestinationWorksheet Duplicate C:\> Close-ExcelPackage $excel This is almost the same as the previous example, except source sheet is specified by position rather than name and because -Show is not specified, so other steps can be carried using the package object, at the end the file is saved by Close-ExcelPackage ## PARAMETERS ### -SourceObject + An ExcelWorkbook or ExcelPackage object or the path to an XLSx file where the data is found. ```yaml @@ -78,7 +75,8 @@ Accept wildcard characters: False ``` ### -SourceWorkSheet -Name or number (starting from 1) of the worksheet in the source workbook (defaults to 1). + +Name or number \(starting from 1\) of the worksheet in the source workbook \(defaults to 1\). ```yaml Type: Object @@ -93,6 +91,7 @@ Accept wildcard characters: False ``` ### -DestinationWorkbook + An ExcelWorkbook or ExcelPackage object or the path to an XLSx file where the data should be copied. ```yaml @@ -108,8 +107,8 @@ Accept wildcard characters: False ``` ### -DestinationWorksheet -Name of the worksheet in the destination workbook; by default the same as the source worksheet's name. -If the sheet exists it will be deleted and re-copied. + +Name of the worksheet in the destination workbook; by default the same as the source worksheet's name. If the sheet exists it will be deleted and re-copied. ```yaml Type: Object @@ -124,6 +123,7 @@ Accept wildcard characters: False ``` ### -Show + if the destination is an excel package or a path, launch excel and open the file on completion. ```yaml @@ -139,7 +139,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -148,3 +149,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Expand-NumberFormat.md b/mdhelp/en/expand-numberformat.md similarity index 72% rename from mdHelp/en/Expand-NumberFormat.md rename to mdhelp/en/expand-numberformat.md index c643555..9b9e70c 100644 --- a/mdHelp/en/Expand-NumberFormat.md +++ b/mdhelp/en/expand-numberformat.md @@ -1,48 +1,54 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Expand-NumberFormat ## SYNOPSIS + Converts short names for number formats to the formatting strings used in Excel ## SYNTAX -``` +```text Expand-NumberFormat [[-NumberFormat] ] [] ``` ## DESCRIPTION -Where you can type a number format you can write, for example, 'Short-Date' and the module will translate it into the format string used by Excel. Some formats, like Short-Date, change when Excel loads (so date will use the local ordering of year, month and Day). Excel also changes how markers in the are presented different cultures "," is used in the format string to mean "local thousand seperator" but depending on the country "," or "." or " " may used as the thousand seperator. + +Where you can type a number format you can write, for example, 'Short-Date' and the module will translate it into the format string used by Excel. Some formats, like Short-Date, change when Excel loads \(so date will use the local ordering of year, month and Day\). Excel also changes how markers in the are presented different cultures "," is used in the format string to mean "local thousand seperator" but depending on the country "," or "." or " " may used as the thousand seperator. ## EXAMPLES ### EXAMPLE 1 -``` + +```text Expand-NumberFormat percentage ``` + Returns "0.00%" ### EXAMPLE 2 -``` + +```text Expand-NumberFormat Currency ``` + Returns the currency format specified in the local regional settings, which may not be the same as Excel uses. The regional settings set the currency symbol and then whether it is before or after the number and separated with a space or not; for negative numbers the number may be wrapped in parentheses or a - sign might appear before or after the number and symbol. -So this returns $#,##0.00;($#,##0.00) for English US, #,##0.00 €;€#,##0.00- for French. +So this returns $\#,\#\#0.00;\($\#,\#\#0.00\) for English US, \#,\#\#0.00 €;€\#,\#\#0.00- for French. -Note some Eurozone countries write €1,23 and others 1,23€. In French the decimal point will be rendered as a "," and the thousand -separator as a space. +Note some Eurozone countries write €1,23 and others 1,23€. In French the decimal point will be rendered as a "," and the thousand separator as a space. ## PARAMETERS ### -NumberFormat + The format string to Expand ```yaml @@ -58,13 +64,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### System.String + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Export-Excel.md b/mdhelp/en/export-excel.md similarity index 90% rename from mdHelp/en/Export-Excel.md rename to mdhelp/en/export-excel.md index e4e3c1b..e1a76f2 100644 --- a/mdHelp/en/Export-Excel.md +++ b/mdhelp/en/export-excel.md @@ -1,43 +1,48 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Export-Excel ## SYNOPSIS + Exports data to an Excel worksheet. ## SYNTAX -### Default (Default) -``` +### Default \(Default\) + +```text Export-Excel [[-Path] ] [-InputObject ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ][-IncludePivotTable] [-PivotTableName ] [-PivotRows [-PivotColumns ] [-PivotData ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTableDefinition ] [-IncludePivotChart] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-AutoSize] [-MaxAutoSizeRows ] [-NoClobber] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-NoHeader] [-RangeName ] [-TableName ] [-TableStyle ] [-Barchart] [-PieChart] [-LineChart] [-ColumnChart] [-ExcelChartDefinition ] [-HideSheet ] [-UnHideSheet ] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-KillExcel] [-AutoNameRange] [-StartRow ] [-StartColumn ] [-PassThru] [-Numberformat ] [-ExcludeProperty ] [-NoAliasOrScriptPropeties] [-DisplayPropertySet] [-NoNumberConversion ] [-ConditionalFormat ] [-ConditionalText ] [-Style ] [-CellStyleSB ] [-Activate] [-Now] [-ReturnRange] [-PivotTotals ] [-NoTotalsInPivot] [-ReZip] [] ``` ### Package -``` + +```text Export-Excel -ExcelPackage [-InputObject ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ] [-IncludePivotTable] [-PivotTableName ] [-PivotRows ] [-PivotColumns ] [-PivotData ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTableDefinition ] [-IncludePivotChart] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-AutoSize] [-MaxAutoSizeRows ] [-NoClobber] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-NoHeader] [-RangeName ] [-TableName ] [-TableStyle ] [-Barchart] [-PieChart] [-LineChart] [-ColumnChart] [-ExcelChartDefinition ] [-HideSheet ] [-UnHideSheet ] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-KillExcel] [-AutoNameRange] [-StartRow ] [-StartColumn ] [-PassThru] [-Numberformat ] [-ExcludeProperty ] [-NoAliasOrScriptPropeties] [-DisplayPropertySet] [-NoNumberConversion ] [-ConditionalFormat ] [-ConditionalText ] [-Style ] [-CellStyleSB ] [-Activate] [-ReturnRange] [-PivotTotals ] [-NoTotalsInPivot] [-ReZip] [] ``` ## DESCRIPTION -Exports data to an Excel file and where possible tries to convert numbers in text fields so Excel recognizes them as numbers instead of text. After all: Excel is a spreadsheet program used for number manipulation and calculations. -The parameter -NoNumberConversion * can be used if number conversion is not desired. + +Exports data to an Excel file and where possible tries to convert numbers in text fields so Excel recognizes them as numbers instead of text. After all: Excel is a spreadsheet program used for number manipulation and calculations. The parameter -NoNumberConversion \* can be used if number conversion is not desired. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Get-Process | Export-Excel .\Test.xlsx -show ``` Export all the processes to the Excel file 'Test.xlsx' and open the file immediately. ### EXAMPLE 2 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -53,7 +58,8 @@ Exports all data to the Excel file 'Excel.xslx' and colors the negative values i It will also add a dollar sign in front of the numbers which use a thousand seperator and display to two decimal places. ### EXAMPLE 3 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -80,7 +86,8 @@ PS\> [PSCustOmobject][Ordered]@{ Exports all data to the Excel file "Excel.xlsx" and tries to convert all values to numbers where possible except for "IPAddress" and "Number1", which are stored in the sheet 'as is', without being converted to a number. ### EXAMPLE 4 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -104,10 +111,11 @@ PS\> [PSCustOmobject][Ordered]@{ } | Export-Excel @ExcelParams -NoNumberConversion * ``` -Exports all data to the Excel file 'Excel.xslx' as is, no number conversion will take place. This means that Excel will show the exact same data that you handed over to the 'Export-Excel' function. +Exports all data to the Excel file 'Excel.xslx' as is, no number conversion will take place. This means that Excel will show the exact same data that you handed over to the 'Export-Excel' function. ### EXAMPLE 5 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -125,7 +133,8 @@ Exports data that will have a Conditional Formatting rule in Excel that will sho Where the condition is not met the color will be the default, black text on a white background. ### EXAMPLE 6 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -146,7 +155,8 @@ If the value contains the word "Running" it will have a background fill color of If neither condition is met, the color will be the default, black text on a white background. ### EXAMPLE 7 -``` + +```text PS\> $ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -180,22 +190,26 @@ PS\> $Array | Update-FirstObjectProperties | Export-Excel @ExcelParams -Workshee Updates the first object of the array by adding property 'Member3' and 'Member4'. Afterwards, all objects are exported to an Excel file and all column headers are visible. ### EXAMPLE 8 -``` + +```text PS\> Get-Process | Export-Excel .\test.xlsx -WorksheetName Processes -IncludePivotTable -Show -PivotRows Company -PivotData PM ``` ### EXAMPLE 9 -``` + +```text PS\> Get-Process | Export-Excel .\test.xlsx -WorksheetName Processes -ChartType PieExploded3D -IncludePivotChart -IncludePivotTable -Show -PivotRows Company -PivotData PM ``` ### EXAMPLE 10 -``` + +```text PS\> Get-Service | Export-Excel 'c:\temp\test.xlsx' -Show -IncludePivotTable -PivotRows status -PivotData @{status='count'} ``` ### EXAMPLE 11 -``` + +```text PS\> $pt = [ordered]@{} PS\> $pt.pt1=@{ SourceWorkSheet = 'Sheet1'; @@ -224,7 +238,8 @@ Then it puts Service data on Sheet1 with one call to Export-Excel and Process Da The third and final call adds the two PivotTables and opens the spreadsheet in Excel. ### EXAMPLE 12 -``` + +```text PS\> Remove-Item -Path .\test.xlsx PS\> $excel = Get-Service | Select-Object -Property Status,Name,DisplayName,StartType | Export-Excel -Path .\test.xlsx -PassThru PS\> $excel.Workbook.Worksheets ["Sheet1"].Row(1).style.font.bold = $true @@ -244,7 +259,8 @@ It then uses the package object to apply formatting, and then saves the workbook Note: Other commands in the module remove the need to work directly with the package object in this way. ### EXAMPLE 13 -``` + +```text PS\> Remove-Item -Path .\test.xlsx -ErrorAction Ignore PS\> $excel = Get-Process | Select-Object -Property Name,Company,Handles,CPU,PM,NPM,WS | Export-Excel -Path .\test.xlsx -ClearSheet -WorksheetName "Processes" -PassThru @@ -266,15 +282,17 @@ This a more sophisticated version of the previous example showing different ways In the final command a PivotChart is added and the workbook is opened in Excel. ### EXAMPLE 14 -``` + +```text PS\> 0..360 | ForEach-Object {[pscustomobject][ordered]@{X=$_; Sinx="=Sin(Radians(x)) "} } | Export-Excel -now -LineChart -AutoNameRange ``` -Creates a line chart showing the value of Sine(x) for values of X between 0 and 360 degrees. +Creates a line chart showing the value of Sine\(x\) for values of X between 0 and 360 degrees. ### EXAMPLE 15 -``` + +```text PS\> Invoke-Sqlcmd -ServerInstance localhost\DEFAULT -Database AdventureWorks2014 -Query "select * from sys.tables" -OutputAs DataRows | Export-Excel -Path .\SysTables_AdventureWorks2014.xlsx -WorksheetName Tables ``` @@ -286,6 +304,7 @@ NOTE: You need to install the SqlServer module from the PowerShell Gallery in or ## PARAMETERS ### -Path + Path to a new or existing .XLSX file. ```yaml @@ -301,6 +320,7 @@ Accept wildcard characters: False ``` ### -ExcelPackage + An object representing an Excel Package - usually this is returned by specifying -PassThru allowing multiple commands to work on the same workbook without saving and reloading each time. ```yaml @@ -316,6 +336,7 @@ Accept wildcard characters: False ``` ### -InputObject + Date is usually piped into Export-Excel, but it also accepts data through the InputObject parameter ```yaml @@ -331,6 +352,7 @@ Accept wildcard characters: False ``` ### -Calculate + If specified, a recalculation of the worksheet will be requested before saving. ```yaml @@ -346,6 +368,7 @@ Accept wildcard characters: False ``` ### -Show + Opens the Excel file immediately after creation; convenient for viewing the results instantly without having to search for the file first. ```yaml @@ -361,6 +384,7 @@ Accept wildcard characters: False ``` ### -WorksheetName + The name of a sheet within the workbook - "Sheet1" by default. ```yaml @@ -376,6 +400,7 @@ Accept wildcard characters: False ``` ### -Password + Sets password protection on the workbook. ```yaml @@ -391,9 +416,10 @@ Accept wildcard characters: False ``` ### -ClearSheet + If specified Export-Excel will remove any existing worksheet with the selected name. -The default behaviour is to overwrite cells in this sheet as needed (but leaving non-overwritten ones in place). +The default behaviour is to overwrite cells in this sheet as needed \(but leaving non-overwritten ones in place\). ```yaml Type: SwitchParameter @@ -408,6 +434,7 @@ Accept wildcard characters: False ``` ### -Append + If specified data will be added to the end of an existing sheet, using the same column headings. ```yaml @@ -423,6 +450,7 @@ Accept wildcard characters: False ``` ### -Title + Text of a title to be placed in the top left cell. ```yaml @@ -438,6 +466,7 @@ Accept wildcard characters: False ``` ### -TitleFillPattern + Sets the fill pattern for the title cell. ```yaml @@ -454,6 +483,7 @@ Accept wildcard characters: False ``` ### -TitleBold + Sets the title in boldface type. ```yaml @@ -469,6 +499,7 @@ Accept wildcard characters: False ``` ### -TitleSize + Sets the point size for the title. ```yaml @@ -484,6 +515,7 @@ Accept wildcard characters: False ``` ### -TitleBackgroundColor + Sets the cell background color for the title cell. ```yaml @@ -499,6 +531,7 @@ Accept wildcard characters: False ``` ### -IncludePivotTable + Adds a PivotTable using the data in the worksheet. ```yaml @@ -514,6 +547,7 @@ Accept wildcard characters: False ``` ### -PivotTableName + If a PivotTable is created from command line parameters, specifies the name of the new sheet holding the pivot. Defaults to "WorksheetName-PivotTable". ```yaml @@ -529,7 +563,8 @@ Accept wildcard characters: False ``` ### -PivotRows -Name(s) of column(s) from the spreadsheet which will provide the Row name(s) in a PivotTable created from command line parameters. + +Name\(s\) of column\(s\) from the spreadsheet which will provide the Row name\(s\) in a PivotTable created from command line parameters. ```yaml Type: String[] @@ -544,7 +579,8 @@ Accept wildcard characters: False ``` ### -PivotColumns -Name(s) of columns from the spreadsheet which will provide the Column name(s) in a PivotTable created from command line parameters. + +Name\(s\) of columns from the spreadsheet which will provide the Column name\(s\) in a PivotTable created from command line parameters. ```yaml Type: String[] @@ -559,9 +595,10 @@ Accept wildcard characters: False ``` ### -PivotData + In a PivotTable created from command line parameters, the fields to use in the table body are given as a Hash-table in the form -ColumnName = Average|Count|CountNums|Max|Min|Product|None|StdDev|StdDevP|Sum|Var|VarP. +ColumnName = Average\|Count\|CountNums\|Max\|Min\|Product\|None\|StdDev\|StdDevP\|Sum\|Var\|VarP. ```yaml Type: Object @@ -576,7 +613,8 @@ Accept wildcard characters: False ``` ### -PivotFilter -Name(s) columns from the spreadsheet which will provide the Filter name(s) in a PivotTable created from command line parameters. + +Name\(s\) columns from the spreadsheet which will provide the Filter name\(s\) in a PivotTable created from command line parameters. ```yaml Type: String[] @@ -591,6 +629,7 @@ Accept wildcard characters: False ``` ### -PivotDataToColumn + If there are multiple datasets in a PivotTable, by default they are shown as separate rows under the given row heading; this switch makes them separate columns. ```yaml @@ -606,6 +645,7 @@ Accept wildcard characters: False ``` ### -PivotTableDefinition + Instead of describing a single PivotTable with multiple command-line parameters; you can use a HashTable in the form PivotTableName = Definition; In this table Definition is itself a Hashtable with Sheet, PivotRows, PivotColumns, PivotData, IncludePivotChart and ChartType values. The New-PivotTableDefinition command will create the definition from a command line. @@ -623,6 +663,7 @@ Accept wildcard characters: False ``` ### -IncludePivotChart + Include a chart with the PivotTable - implies -IncludePivotTable. ```yaml @@ -638,7 +679,8 @@ Accept wildcard characters: False ``` ### -ChartType -The type for PivotChart (one of Excel's defined chart types). + +The type for PivotChart \(one of Excel's defined chart types\). ```yaml Type: eChartType @@ -654,6 +696,7 @@ Accept wildcard characters: False ``` ### -NoLegend + Exclude the legend from the PivotChart. ```yaml @@ -669,6 +712,7 @@ Accept wildcard characters: False ``` ### -ShowCategory + Add category labels to the PivotChart. ```yaml @@ -684,6 +728,7 @@ Accept wildcard characters: False ``` ### -ShowPercent + Add percentage labels to the PivotChart. ```yaml @@ -699,6 +744,7 @@ Accept wildcard characters: False ``` ### -AutoSize + Sizes the width of the Excel column to the maximum width needed to display all the containing data in that cell. ```yaml @@ -714,6 +760,7 @@ Accept wildcard characters: False ``` ### -MaxAutoSizeRows + Autosizing can be time consuming, so this sets a maximum number of rows to look at for the Autosize operation. Default is 1000; If 0 is specified ALL rows will be checked ```yaml @@ -729,6 +776,7 @@ Accept wildcard characters: False ``` ### -NoClobber + Not used. Left in to avoid problems with older scripts, it may be removed in future versions. ```yaml @@ -744,6 +792,7 @@ Accept wildcard characters: False ``` ### -FreezeTopRow + Freezes headers etc. in the top row. ```yaml @@ -759,6 +808,7 @@ Accept wildcard characters: False ``` ### -FreezeFirstColumn + Freezes titles etc. in the left column. ```yaml @@ -774,7 +824,8 @@ Accept wildcard characters: False ``` ### -FreezeTopRowFirstColumn -Freezes top row and left column (equivalent to Freeze pane 2,2 ). + +Freezes top row and left column \(equivalent to Freeze pane 2,2 \). ```yaml Type: SwitchParameter @@ -789,7 +840,8 @@ Accept wildcard characters: False ``` ### -FreezePane -Freezes panes at specified coordinates (in the form RowNumber, ColumnNumber). + +Freezes panes at specified coordinates \(in the form RowNumber, ColumnNumber\). ```yaml Type: Int32[] @@ -804,6 +856,7 @@ Accept wildcard characters: False ``` ### -AutoFilter + Enables the Excel filter on the complete header row, so users can easily sort, filter and/or search the data in the selected column. ```yaml @@ -819,6 +872,7 @@ Accept wildcard characters: False ``` ### -BoldTopRow + Makes the top row boldface. ```yaml @@ -834,6 +888,7 @@ Accept wildcard characters: False ``` ### -NoHeader + Specifies that field names should not be put at the top of columns. ```yaml @@ -849,6 +904,7 @@ Accept wildcard characters: False ``` ### -RangeName + Makes the data in the worksheet a named range. ```yaml @@ -864,6 +920,7 @@ Accept wildcard characters: False ``` ### -TableName + Makes the data in the worksheet a table with a name, and applies a style to it. The name must not contain spaces. If the -Tablestyle parameter is specified without Tablename, "table1", "table2" etc. will be used. ```yaml @@ -879,7 +936,8 @@ Accept wildcard characters: False ``` ### -TableStyle -Selects the style for the named table - if the Tablename parameter is specified without giving a style, 'Medium6' is used as a default. + +Selects the style for the named table - if the Tablename parameter is specified without giving a style, 'Medium6' is used as a default. ```yaml Type: TableStyles @@ -895,6 +953,7 @@ Accept wildcard characters: False ``` ### -Barchart + Creates a "quick" bar chart using the first text column as labels and the first numeric column as values. ```yaml @@ -910,6 +969,7 @@ Accept wildcard characters: False ``` ### -PieChart + Creates a "quick" pie chart using the first text column as labels and the first numeric column as values. ```yaml @@ -925,6 +985,7 @@ Accept wildcard characters: False ``` ### -LineChart + Creates a "quick" line chart using the first text column as labels and the first numeric column as values. ```yaml @@ -940,6 +1001,7 @@ Accept wildcard characters: False ``` ### -ColumnChart + Creates a "quick" column chart using the first text column as labels and the first numeric column as values. ```yaml @@ -955,7 +1017,8 @@ Accept wildcard characters: False ``` ### -ExcelChartDefinition -A hash-table containing ChartType, Title, NoLegend, ShowCategory, ShowPercent, Yrange, Xrange and SeriesHeader for one or more \[non-Pivot\] charts. This can be created with the New-ExcelChartDefinition command. + +A hash-table containing ChartType, Title, NoLegend, ShowCategory, ShowPercent, Yrange, Xrange and SeriesHeader for one or more \[non-Pivot\] charts. This can be created with the New-ExcelChartDefinition command. ```yaml Type: Object[] @@ -970,7 +1033,8 @@ Accept wildcard characters: False ``` ### -HideSheet -Name(s) of Sheet(s) to hide in the workbook, supports wildcards. If the selection would cause all sheets to be hidden, the sheet being worked on will be revealed. + +Name\(s\) of Sheet\(s\) to hide in the workbook, supports wildcards. If the selection would cause all sheets to be hidden, the sheet being worked on will be revealed. ```yaml Type: String[] @@ -985,7 +1049,8 @@ Accept wildcard characters: False ``` ### -UnHideSheet -Name(s) of Sheet(s) to reveal in the workbook, supports wildcards. + +Name\(s\) of Sheet\(s\) to reveal in the workbook, supports wildcards. ```yaml Type: String[] @@ -1000,6 +1065,7 @@ Accept wildcard characters: False ``` ### -MoveToStart + If specified, the worksheet will be moved to the start of the workbook. -MoveToStart takes precedence over -MoveToEnd, -Movebefore and -MoveAfter if more than one is specified. @@ -1017,7 +1083,8 @@ Accept wildcard characters: False ``` ### -MoveToEnd -If specified, the worksheet will be moved to the end of the workbook. (This is the default position for newly created sheets, but the option can be specified to move existing sheets.) + +If specified, the worksheet will be moved to the end of the workbook. \(This is the default position for newly created sheets, but the option can be specified to move existing sheets.\) ```yaml Type: SwitchParameter @@ -1032,7 +1099,8 @@ Accept wildcard characters: False ``` ### -MoveBefore -If specified, the worksheet will be moved before the nominated one (which can be a position starting from 1, or a name). + +If specified, the worksheet will be moved before the nominated one \(which can be a position starting from 1, or a name\). -MoveBefore takes precedence over -MoveAfter if both are specified. @@ -1049,9 +1117,10 @@ Accept wildcard characters: False ``` ### -MoveAfter -If specified, the worksheet will be moved after the nominated one (which can be a position starting from 1, or a name or *). -If * is used, the worksheet names will be examined starting with the first one, and the sheet placed after the last sheet which comes before it alphabetically. +If specified, the worksheet will be moved after the nominated one \(which can be a position starting from 1, or a name or \*\). + +If \* is used, the worksheet names will be examined starting with the first one, and the sheet placed after the last sheet which comes before it alphabetically. ```yaml Type: Object @@ -1066,6 +1135,7 @@ Accept wildcard characters: False ``` ### -KillExcel + Closes Excel without stopping to ask if work should be saved - prevents errors writing to the file because Excel has it open. ```yaml @@ -1081,6 +1151,7 @@ Accept wildcard characters: False ``` ### -AutoNameRange + Makes each column a named range. ```yaml @@ -1096,8 +1167,8 @@ Accept wildcard characters: False ``` ### -StartRow -Row to start adding data. 1 by default. -Row 1 will contain the title, if any is specifed. Then headers will appear (Unless -No header is specified) then the data appears. + +Row to start adding data. 1 by default. Row 1 will contain the title, if any is specifed. Then headers will appear \(Unless -No header is specified\) then the data appears. ```yaml Type: Int32 @@ -1112,6 +1183,7 @@ Accept wildcard characters: False ``` ### -StartColumn + Column to start adding data - 1 by default. ```yaml @@ -1127,8 +1199,8 @@ Accept wildcard characters: False ``` ### -PassThru -If specified, Export-Excel returns an object representing the Excel package without saving the package first. -To save, you must either use the Close-ExcelPackage command, or send the package object back to Export-Excel which will save and close the file, or use the object's .Save() or SaveAs() method. + +If specified, Export-Excel returns an object representing the Excel package without saving the package first. To save, you must either use the Close-ExcelPackage command, or send the package object back to Export-Excel which will save and close the file, or use the object's .Save\(\) or SaveAs\(\) method. ```yaml Type: SwitchParameter @@ -1143,8 +1215,10 @@ Accept wildcard characters: False ``` ### -Numberformat + Formats all values that can be converted to a number to the format specified. For examples: -``` + +```text '0' integer (not really needed unless you need to round numbers, Excel will use default cell properties). '#' integer without displaying the number 0 in the cell. '0.0' number with 1 decimal place. @@ -1169,6 +1243,7 @@ Accept wildcard characters: False ``` ### -ExcludeProperty + Specifies properties which may exist in the target data but should not be placed on the worksheet. ```yaml @@ -1184,6 +1259,7 @@ Accept wildcard characters: False ``` ### -NoAliasOrScriptPropeties + Some objects in PowerShell duplicate existing properties by adding aliases, or have Script properties which may take a long time to return a value and slow the export down, if specified this option removes these properties ```yaml @@ -1199,7 +1275,8 @@ Accept wildcard characters: False ``` ### -DisplayPropertySet -Many (but not all) objects in PowerShell have a hidden property named psStandardmembers with a child property DefaultDisplayPropertySet ; this parameter reduces the properties exported to those in this set. + +Many \(but not all\) objects in PowerShell have a hidden property named psStandardmembers with a child property DefaultDisplayPropertySet ; this parameter reduces the properties exported to those in this set. ```yaml Type: SwitchParameter @@ -1214,9 +1291,10 @@ Accept wildcard characters: False ``` ### -NoNumberConversion + By default the command will convert all values to numbers if possible, but this isn't always desirable. -NoNumberConversion allows you to add exceptions for the conversion. -The only Wildcard allowed is * for all properties +The only Wildcard allowed is \* for all properties ```yaml Type: String[] @@ -1231,6 +1309,7 @@ Accept wildcard characters: False ``` ### -ConditionalFormat + One or more conditional formatting rules defined with New-ConditionalFormattingIconSet. ```yaml @@ -1246,6 +1325,7 @@ Accept wildcard characters: False ``` ### -ConditionalText + Applies a Conditional formatting rule defined with New-ConditionalText. When specific conditions are met the format is applied. ```yaml @@ -1261,7 +1341,8 @@ Accept wildcard characters: False ``` ### -Style -Takes style settings as a hash-table (which may be built with the New-ExcelStyle command) and applies them to the worksheet. If the hash-table contains a range the settings apply to the range, otherewise they apply to the whole sheet. + +Takes style settings as a hash-table \(which may be built with the New-ExcelStyle command\) and applies them to the worksheet. If the hash-table contains a range the settings apply to the range, otherewise they apply to the whole sheet. ```yaml Type: Object[] @@ -1276,8 +1357,8 @@ Accept wildcard characters: False ``` ### -CellStyleSB -A script block which is run at the end of the export to apply styles to cells (although it can be used for other purposes). -The script block is given three paramaters; an object containing the current worksheet, the Total number of Rows and the number of the last column. + +A script block which is run at the end of the export to apply styles to cells \(although it can be used for other purposes\). The script block is given three paramaters; an object containing the current worksheet, the Total number of Rows and the number of the last column. ```yaml Type: ScriptBlock @@ -1292,6 +1373,7 @@ Accept wildcard characters: False ``` ### -Activate + If there is already content in the workbook, a new sheet will not be active UNLESS Activate is specified; when a PivotTable is created its sheet will be activated by this switch. ```yaml @@ -1307,6 +1389,7 @@ Accept wildcard characters: False ``` ### -Now + The -Now switch is a shortcut that automatically creates a temporary file, enables "AutoSize", "TableName" and "Show", and opens the file immediately. ```yaml @@ -1322,6 +1405,7 @@ Accept wildcard characters: False ``` ### -ReturnRange + If specified, Export-Excel returns the range of added cells in the format "A1:Z100". ```yaml @@ -1337,7 +1421,8 @@ Accept wildcard characters: False ``` ### -PivotTotals -By default, PivotTables have totals for each row (on the right) and for each column at the bottom. This allows just one or neither to be selected. + +By default, PivotTables have totals for each row \(on the right\) and for each column at the bottom. This allows just one or neither to be selected. ```yaml Type: String @@ -1352,6 +1437,7 @@ Accept wildcard characters: False ``` ### -NoTotalsInPivot + In a PivotTable created from command line parameters, prevents the addition of totals to rows and columns. ```yaml @@ -1367,7 +1453,8 @@ Accept wildcard characters: False ``` ### -ReZip -If specified, Export-Excel will expand the contents of the .XLSX file (which is multiple files in a zip archive) and rebuild it. + +If specified, Export-Excel will expand the contents of the .XLSX file \(which is multiple files in a zip archive\) and rebuild it. ```yaml Type: SwitchParameter @@ -1382,13 +1469,15 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.ExcelPackage + ## NOTES ## RELATED LINKS diff --git a/mdHelp/en/Get-ExcelSheetInfo.md b/mdhelp/en/get-excelsheetinfo.md similarity index 71% rename from mdHelp/en/Get-ExcelSheetInfo.md rename to mdhelp/en/get-excelsheetinfo.md index 5d718c3..10ae30e 100644 --- a/mdHelp/en/Get-ExcelSheetInfo.md +++ b/mdhelp/en/get-excelsheetinfo.md @@ -1,35 +1,39 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Get-ExcelSheetInfo ## SYNOPSIS + Get worksheet names and their indices of an Excel workbook. ## SYNTAX -``` +```text Get-ExcelSheetInfo [-Path] [] ``` ## DESCRIPTION + The Get-ExcelSheetInfo cmdlet gets worksheet names and their indices of an Excel workbook. ## EXAMPLES ### EXAMPLE 1 -``` + +```text Get-ExcelSheetInfo .\Test.xlsx ``` ## PARAMETERS ### -Path -Specifies the path to the Excel file. (This parameter is required.) + +Specifies the path to the Excel file. \(This parameter is required.\) ```yaml Type: Object @@ -44,15 +48,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ## NOTES -CHANGELOG -2016/01/07 Added Created by Johan Akerstrom (https://github.com/CosmosKey) + +CHANGELOG 2016/01/07 Added Created by Johan Akerstrom \([https://github.com/CosmosKey](https://github.com/CosmosKey)\) ## RELATED LINKS diff --git a/mdhelp/en/get-excelworkbookinfo.md b/mdhelp/en/get-excelworkbookinfo.md new file mode 100644 index 0000000..136e890 --- /dev/null +++ b/mdhelp/en/get-excelworkbookinfo.md @@ -0,0 +1,67 @@ +--- +external help file: ImportExcel-help.xml +Module Name: ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' +schema: 2.0.0 +--- + +# Get-ExcelWorkbookInfo + +## SYNOPSIS + +Retrieve information of an Excel workbook. + +## SYNTAX + +```text +Get-ExcelWorkbookInfo [-Path] [] +``` + +## DESCRIPTION + +The Get-ExcelWorkbookInfo cmdlet retrieves information \(LastModifiedBy, LastPrinted, Created, Modified, ...\) fron an Excel workbook. These are the same details that are visible in Windows Explorer when right clicking the Excel file, selecting Properties and check the Details tabpage. + +## EXAMPLES + +### EXAMPLE 1 + +```text +Get-ExcelWorkbookInfo .\Test.xlsx +``` + +CorePropertiesXml : \#document Title : Subject : Author : Konica Minolta User Comments : Keywords : LastModifiedBy : Bond, James \(London\) GBR LastPrinted : 2017-01-21T12:36:11Z Created : 17/01/2017 13:51:32 Category : Status : ExtendedPropertiesXml : \#document Application : Microsoft Excel HyperlinkBase : AppVersion : 14.0300 Company : Secret Service Manager : Modified : 10/02/2017 12:45:37 CustomPropertiesXml : \#document + +## PARAMETERS + +### -Path + +Specifies the path to the Excel file. This parameter is required. + +```yaml +Type: String +Parameter Sets: (All) +Aliases: FullName + +Required: True +Position: 1 +Default value: None +Accept pipeline input: True (ByPropertyName, ByValue) +Accept wildcard characters: False +``` + +### CommonParameters + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +## INPUTS + +## OUTPUTS + +## NOTES + +CHANGELOG 2016/01/07 Added Created by Johan Akerstrom \([https://github.com/CosmosKey](https://github.com/CosmosKey)\) + +## RELATED LINKS + +[https://github.com/dfinke/ImportExcel](https://github.com/dfinke/ImportExcel) + diff --git a/mdHelp/en/Import-Excel.md b/mdhelp/en/import-excel.md similarity index 86% rename from mdHelp/en/Import-Excel.md rename to mdhelp/en/import-excel.md index 18e64b1..26b3a46 100644 --- a/mdHelp/en/Import-Excel.md +++ b/mdhelp/en/import-excel.md @@ -1,62 +1,69 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Import-Excel ## SYNOPSIS + Create custom objects from the rows in an Excel worksheet. ## SYNTAX ### PathC -``` + +```text Import-Excel [-Path] [[-WorksheetName] ] [-NoHeader] [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ### PathB -``` + +```text Import-Excel [-Path] [[-WorksheetName] ] -HeaderName [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ### PathA -``` + +```text Import-Excel [-Path] [[-WorksheetName] ] [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ### PackageC -``` + +```text Import-Excel -ExcelPackage [[-WorksheetName] ] [-NoHeader] [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ### PackageB -``` + +```text Import-Excel -ExcelPackage [[-WorksheetName] ] -HeaderName [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ### PackageA -``` + +```text Import-Excel -ExcelPackage [[-WorksheetName] ] [-StartRow ] [-EndRow ] [-StartColumn ] [-EndColumn ] [-DataOnly] [-AsText ] [-Password ] [] ``` ## DESCRIPTION + The Import-Excel cmdlet creates custom objects from the rows in an Excel worksheet. Each row is represented as one object. This is possible without installing Microsoft Excel by using the .NET library 'EPPLus.dll'. By default, the property names of the objects are retrieved from the column headers. Because an object cannot have a blank property name, only columns with column headers will be imported. -If the default behavior is not desired and you want to import the complete worksheet 'as is', the parameter '-NoHeader' can be used. -In case you want to provide your own property names, you can use the parameter '-HeaderName'. +If the default behavior is not desired and you want to import the complete worksheet 'as is', the parameter '-NoHeader' can be used. In case you want to provide your own property names, you can use the parameter '-HeaderName'. ## EXAMPLES ### EXAMPLE 1 -``` +```text ---------------------------------------------- | File: Movies.xlsx - Sheet: Actors | ---------------------------------------------- @@ -74,13 +81,14 @@ Address : California First Name: Jean-Claude Address : Brussels ``` -Import data from an Excel worksheet. One object is created for each row. The property names of the objects consist of the column names defined in the first row. In case a column doesn't have a column header (usually in row 1 when '-StartRow' is not used), then the unnamed columns will be skipped and the data in those columns will not be imported. + +Import data from an Excel worksheet. One object is created for each row. The property names of the objects consist of the column names defined in the first row. In case a column doesn't have a column header \(usually in row 1 when '-StartRow' is not used\), then the unnamed columns will be skipped and the data in those columns will not be imported. Notice that column 'B' is not imported because there's no value in cell 'B1' that can be used as property name for the objects. ### EXAMPLE 2 -``` +```text ---------------------------------------------- | File: Movies.xlsx - Sheet: Actors | ---------------------------------------------- @@ -105,13 +113,13 @@ P2: Vandamme P3: Brussels ``` -Imports the complete Excel worksheet 'as is' by using the '-NoHeader' switch. One object is created for each row. The property names of the objects will be automatically generated (P1, P2, P3, ..). +Imports the complete Excel worksheet 'as is' by using the '-NoHeader' switch. One object is created for each row. The property names of the objects will be automatically generated \(P1, P2, P3, ..\). -Notice that the column header (row 1) is imported as an object too. +Notice that the column header \(row 1\) is imported as an object too. ### EXAMPLE 3 -``` +```text ---------------------------------------------------------- | File: Movies.xlsx - Sheet: Movies | ---------------------------------------------------------- @@ -144,13 +152,14 @@ Year : 2012 Rating : 9 Genre : ``` -This imports data from an Excel worksheet, and as before one object is created for each row. The property names for the objects are defined in the parameter '-HeaderName'. The properties are named starting from the most left column (A) to the right. In case no value is present in one of the columns, that property will have an empty value. + +This imports data from an Excel worksheet, and as before one object is created for each row. The property names for the objects are defined in the parameter '-HeaderName'. The properties are named starting from the most left column \(A\) to the right. In case no value is present in one of the columns, that property will have an empty value. Notice that empty rows are imported and that data for the property 'Genre' is not present in the worksheet. As such, the 'Genre' property will be blank for all objects. ### EXAMPLE 4 -``` +```text ---------------------------------------------------------- | File: Movies.xlsx - Sheet: Movies | ---------------------------------------------------------- @@ -176,13 +185,13 @@ P2: 2012 P3: 9 ``` -Import data from an Excel worksheet, and one object is created for each non-blank row. The property names of the objects (P1, P2, P3, ..) are automatically generated by using the switch '-NoHeader' . The switch '-DataOnly' will speed up the import because empty rows and empty columns are not imported. +Import data from an Excel worksheet, and one object is created for each non-blank row. The property names of the objects \(P1, P2, P3, ..\) are automatically generated by using the switch '-NoHeader' . The switch '-DataOnly' will speed up the import because empty rows and empty columns are not imported. Notice that empty rows and empty columns are not imported. ### EXAMPLE 5 -``` +```text ---------------------------------------------------------- | File: Movies.xlsx - Sheet: Actors | ---------------------------------------------------------- @@ -204,23 +213,24 @@ Import data from an Excel worksheet. One object is created for each row. The pro Notice that only 1 object is imported with only 3 properties. Column B and row 2 are empty and have been disregarded by using the switch '-DataOnly'. The property names have been named with the values provided with the parameter '-HeaderName'. Row number 1 with 'Chuck Norris' has not been imported, because we started the import from row 2 with the parameter '-StartRow 2'. ### EXAMPLE 6 -``` + +```text PS\> ,(Import-Excel -Path .\SysTables_AdventureWorks2014.xlsx) | Write-SqlTableData -ServerInstance localhost\DEFAULT -Database BlankDB -SchemaName dbo -TableName MyNewTable_fromExcel -Force - ``` + Imports data from an Excel file and pipes the result to the Write-SqlTableData command to be INSERTed into a table in a SQL Server database. -The ",( ... )" around the Import-Excel command allows all rows to be imported from the Excel file, prior to pipelining to the Write-SqlTableData cmdlet. This helps prevent a RBAR scenario and is important when trying to import thousands of rows. +The ",\( ... \)" around the Import-Excel command allows all rows to be imported from the Excel file, prior to pipelining to the Write-SqlTableData cmdlet. This helps prevent a RBAR scenario and is important when trying to import thousands of rows. The -Force parameter will be ignored if the table already exists. However, if a table is not found that matches the values provided by -SchemaName and -TableName parameters, it will create a new table in SQL Server database. -The Write-SqlTableData cmdlet will inherit the column names & datatypes for the new table from the object being piped in. -NOTE: You need to install the SqlServer module from the PowerShell Gallery in oder to get the Write-SqlTableData cmdlet. +The Write-SqlTableData cmdlet will inherit the column names & datatypes for the new table from the object being piped in. NOTE: You need to install the SqlServer module from the PowerShell Gallery in oder to get the Write-SqlTableData cmdlet. ## PARAMETERS ### -Path + Specifies the path to the Excel file. ```yaml @@ -236,7 +246,8 @@ Accept wildcard characters: False ``` ### -ExcelPackage -Instead of specifying a path, provides an Excel Package object (from Open-ExcelPackage). Using this avoids re-reading the whole file when importing multiple parts of it. + +Instead of specifying a path, provides an Excel Package object \(from Open-ExcelPackage\). Using this avoids re-reading the whole file when importing multiple parts of it. To allow multiple read operations Import-Excel does NOT close the package, and you should use Close-ExcelPackage -noSave to close it. @@ -253,6 +264,7 @@ Accept wildcard characters: False ``` ### -WorksheetName + Specifies the name of the worksheet in the Excel workbook to import. By default, if no name is provided, the first worksheet will be imported. ```yaml @@ -268,6 +280,7 @@ Accept wildcard characters: False ``` ### -HeaderName + Specifies custom property names to use, instead of the values defined in the column headers of the TopRow. If you provide fewer header names than there are columns of data in the worksheet, then data will only be imported from that number of columns - the others will be ignored. @@ -287,7 +300,8 @@ Accept wildcard characters: False ``` ### -NoHeader -Automatically generate property names (P1, P2, P3, ..) instead of the ones defined in the column headers of the TopRow. + +Automatically generate property names \(P1, P2, P3, ..\) instead of the ones defined in the column headers of the TopRow. This switch is best used when you want to import the complete worksheet 'as is' and are not concerned with the property names. @@ -304,6 +318,7 @@ Accept wildcard characters: False ``` ### -StartRow + The row from where we start to import data, all rows above the StartRow are disregarded. By default this is the first row. When the parameters '-NoHeader' and '-HeaderName' are not provided, this row will contain the column headers that will be used as property names. If either is provided, the property names are automatically created and this row will be treated as a regular row containing data. @@ -321,6 +336,7 @@ Accept wildcard characters: False ``` ### -EndRow + By default all rows up to the last cell in the sheet will be imported. If specified, import stops at this row. ```yaml @@ -336,7 +352,8 @@ Accept wildcard characters: False ``` ### -StartColumn -The number of the first column to read data from (1 by default). + +The number of the first column to read data from \(1 by default\). ```yaml Type: Int32 @@ -351,6 +368,7 @@ Accept wildcard characters: False ``` ### -EndColumn + By default the import reads up to the last populated column, -EndColumn tells the import to stop at an earlier number. ```yaml @@ -366,6 +384,7 @@ Accept wildcard characters: False ``` ### -DataOnly + Import only rows and columns that contain data, empty rows and empty columns are not imported. ```yaml @@ -381,7 +400,8 @@ Accept wildcard characters: False ``` ### -AsText -Normally Import-Excel returns the Cell values. AsText allows selected columns to be returned as the text displayed in their cells. (* is supported as a wildcard.) + +Normally Import-Excel returns the Cell values. AsText allows selected columns to be returned as the text displayed in their cells. \(\* is supported as a wildcard.\) ```yaml Type: String[] @@ -396,7 +416,8 @@ Accept wildcard characters: False ``` ### -AsDate -Not all date formats are recognized as indicating the number in the cell represents a date AsDate forces the number which would be returned to be converted to a date. (* is supported as a wildcard.) + +Not all date formats are recognized as indicating the number in the cell represents a date AsDate forces the number which would be returned to be converted to a date. \(\* is supported as a wildcard.\) ```yaml Type: String[] @@ -411,6 +432,7 @@ Accept wildcard characters: False ``` ### -Password + Accepts a string that will be used to open a password protected Excel file. ```yaml @@ -426,7 +448,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS diff --git a/mdHelp/en/Join-Worksheet.md b/mdhelp/en/join-worksheet.md similarity index 94% rename from mdHelp/en/Join-Worksheet.md rename to mdhelp/en/join-worksheet.md index ad9fc2f..d1f17cb 100644 --- a/mdHelp/en/Join-Worksheet.md +++ b/mdhelp/en/join-worksheet.md @@ -1,50 +1,55 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Join-Worksheet ## SYNOPSIS + Combines data on all the sheets in an Excel worksheet onto a single sheet. ## SYNTAX -### Default (Default) -``` +### Default \(Default\) + +```text Join-Worksheet [[-Path] ] [-WorkSheetName ] [-Clearsheet] [-NoHeader] [-FromLabel ] [-LabelBlocks] [-AutoSize] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-HideSource] [-Title ] [-TitleFillPattern ] [-TitleBackgroundColor ] [-TitleBold] [-TitleSize ] [-PivotTableDefinition ] [-ExcelChartDefinition ] [-ConditionalFormat ] [-ConditionalText ] [-AutoNameRange] [-RangeName ] [-ReturnRange] [-Show] [-PassThru][] ``` ### Table -``` + +```text Join-Worksheet [[-Path] ] [-WorkSheetName ] [-Clearsheet] [-NoHeader] [-FromLabel ] [-LabelBlocks] [-AutoSize] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-BoldTopRow] [-HideSource] [-Title ] [-TitleFillPattern ] [-TitleBackgroundColor ] [-TitleBold] [-TitleSize ] [-PivotTableDefinition ] [-ExcelChartDefinition ] [-ConditionalFormat ] [-ConditionalText ] [-AutoNameRange] [-RangeName ] -TableName [-TableStyle ] [-ReturnRange] [-Show] [-PassThru] [] ``` ### PackageTable -``` + +```text Join-Worksheet -ExcelPackage [-WorkSheetName ] [-Clearsheet] [-NoHeader] [-FromLabel ] [-LabelBlocks] [-AutoSize] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-BoldTopRow] [-HideSource] [-Title ] [-TitleFillPattern ] [-TitleBackgroundColor ] [-TitleBold] [-TitleSize ] [-PivotTableDefinition ] [-ExcelChartDefinition ] [-ConditionalFormat ] [-ConditionalText ] [-AutoNameRange] [-RangeName ] -TableName [-TableStyle ] [-ReturnRange] [-Show] [-PassThru] [] ``` ### PackageDefault -``` + +```text Join-Worksheet -ExcelPackage [-WorkSheetName ] [-Clearsheet] [-NoHeader] [-FromLabel ] [-LabelBlocks] [-AutoSize] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-HideSource] [-Title ] [-TitleFillPattern ] [-TitleBackgroundColor ] [-TitleBold] [-TitleSize ] [-PivotTableDefinition ] [-ExcelChartDefinition ] [-ConditionalFormat ] [-ConditionalText ] [-AutoNameRange] [-RangeName ] [-ReturnRange] [-Show] [-PassThru] [] ``` ## DESCRIPTION + Join-Worksheet can work in two main ways, either -*Combining data which has the same layout from many pages into one, or -*Combining pages which have nothing in common. -In the former case the header row is copied from the first sheet and, by default, each row of data is labelled with the name of the sheet it came from. +_Combining data which has the same layout from many pages into one, or_ Combining pages which have nothing in common. In the former case the header row is copied from the first sheet and, by default, each row of data is labelled with the name of the sheet it came from. In the latter case -NoHeader is specified, and each copied block can have the sheet it came from placed above it as a title. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> foreach ($computerName in @('Server1', 'Server2', 'Server3', 'Server4')) { Get-Service -ComputerName $computerName | Select-Object -Property Status, Name, DisplayName, StartType | @@ -59,7 +64,8 @@ The foreach command gets a list of services running on four servers and exports The Join-Worksheet command uses the same file and merges the results into a sheet named "Combined". It sets a column header of "Machinename", this column will contain the name of the sheet the data was copied from; after copying the data to the sheet "Combined", the other sheets will be hidden. Join-Worksheet finishes by calling Export-Excel to AutoSize cells, freeze the top row and make it bold and add thePivotTable. ### EXAMPLE 2 -``` + +```text PS\> Get-CimInstance -ClassName win32_logicaldisk | Select-Object -Property DeviceId,VolumeName, Size,Freespace | Export-Excel -Path "$env:computerName.xlsx" -WorkSheetname Volumes -NumberFormat "0,000" @@ -75,6 +81,7 @@ The Join-Worksheet command copies both onto a page named "Summary".Because the d ## PARAMETERS ### -Path + Path to a new or existing .XLSX file. ```yaml @@ -90,6 +97,7 @@ Accept wildcard characters: False ``` ### -ExcelPackage + An object representing an Excel Package - either from Open-ExcelPackage or specifying -PassThru to Export-Excel. ```yaml @@ -105,6 +113,7 @@ Accept wildcard characters: False ``` ### -WorkSheetName + The name of a sheet within the workbook where the other sheets will be joined together - "Combined" by default. ```yaml @@ -120,6 +129,7 @@ Accept wildcard characters: False ``` ### -Clearsheet + If specified ,any pre-existing target for the joined data will be deleted and re-created; otherwise data will be appended on this sheet. ```yaml @@ -135,6 +145,7 @@ Accept wildcard characters: False ``` ### -NoHeader + Join-Worksheet assumes each sheet has identical headers and the headers should be copied to the target sheet, unless -NoHeader is specified. ```yaml @@ -150,6 +161,7 @@ Accept wildcard characters: False ``` ### -FromLabel + If -NoHeader is NOT specified, then rows of data will be labeled with the name of the sheet they came from. FromLabel is the header for this column. If it is null or empty, the labels will be omitted. ```yaml @@ -165,6 +177,7 @@ Accept wildcard characters: False ``` ### -LabelBlocks + If specified, the copied blocks of data will have the name of the sheet they were copied from inserted above them as a title. ```yaml @@ -180,6 +193,7 @@ Accept wildcard characters: False ``` ### -AutoSize + Sets the width of the Excel columns to display all the data in their cells. ```yaml @@ -195,6 +209,7 @@ Accept wildcard characters: False ``` ### -FreezeTopRow + Freezes headers etc. in the top row. ```yaml @@ -210,6 +225,7 @@ Accept wildcard characters: False ``` ### -FreezeFirstColumn + Freezes titles etc. in the left column. ```yaml @@ -225,7 +241,8 @@ Accept wildcard characters: False ``` ### -FreezeTopRowFirstColumn -Freezes top row and left column (equivalent to Freeze pane 2,2 ). + +Freezes top row and left column \(equivalent to Freeze pane 2,2 \). ```yaml Type: SwitchParameter @@ -240,7 +257,8 @@ Accept wildcard characters: False ``` ### -FreezePane -Freezes panes at specified coordinates (in the formRowNumber , ColumnNumber). + +Freezes panes at specified coordinates \(in the formRowNumber , ColumnNumber\). ```yaml Type: Int32[] @@ -255,6 +273,7 @@ Accept wildcard characters: False ``` ### -AutoFilter + Enables the Excel filter on the headers of the combined sheet. ```yaml @@ -270,6 +289,7 @@ Accept wildcard characters: False ``` ### -BoldTopRow + Makes the top row boldface. ```yaml @@ -285,6 +305,7 @@ Accept wildcard characters: False ``` ### -HideSource + If specified, hides the sheets that the data is copied from. ```yaml @@ -300,6 +321,7 @@ Accept wildcard characters: False ``` ### -Title + Text of a title to be placed in Cell A1. ```yaml @@ -315,6 +337,7 @@ Accept wildcard characters: False ``` ### -TitleFillPattern + Sets the fill pattern for the title cell. ```yaml @@ -331,6 +354,7 @@ Accept wildcard characters: False ``` ### -TitleBackgroundColor + Sets the cell background color for the title cell. ```yaml @@ -346,6 +370,7 @@ Accept wildcard characters: False ``` ### -TitleBold + Sets the title in boldface type. ```yaml @@ -361,6 +386,7 @@ Accept wildcard characters: False ``` ### -TitleSize + Sets the point size for the title. ```yaml @@ -376,7 +402,8 @@ Accept wildcard characters: False ``` ### -PivotTableDefinition -Hashtable(s) with Sheet PivotRows, PivotColumns, PivotData, IncludePivotChart and ChartType values to specify a definition for one or morePivotTable(s). + +Hashtable\(s\) with Sheet PivotRows, PivotColumns, PivotData, IncludePivotChart and ChartType values to specify a definition for one or morePivotTable\(s\). ```yaml Type: Hashtable @@ -391,6 +418,7 @@ Accept wildcard characters: False ``` ### -ExcelChartDefinition + A hashtable containing ChartType, Title, NoLegend, ShowCategory, ShowPercent, Yrange, Xrange and SeriesHeader for one or more \[non-pivot\] charts. ```yaml @@ -406,6 +434,7 @@ Accept wildcard characters: False ``` ### -ConditionalFormat + One or more conditional formatting rules defined with New-ConditionalFormattingIconSet. ```yaml @@ -421,6 +450,7 @@ Accept wildcard characters: False ``` ### -ConditionalText + Applies a Conditional formatting rule defined with New-ConditionalText. ```yaml @@ -436,6 +466,7 @@ Accept wildcard characters: False ``` ### -AutoNameRange + Makes each column a named range. ```yaml @@ -451,6 +482,7 @@ Accept wildcard characters: False ``` ### -RangeName + Makes the data in the worksheet a named range. ```yaml @@ -466,6 +498,7 @@ Accept wildcard characters: False ``` ### -TableName + Makes the data in the worksheet a table with a name and applies a style to it. Name must not contain spaces. ```yaml @@ -481,6 +514,7 @@ Accept wildcard characters: False ``` ### -TableStyle + Selects the style for the named table - defaults to "Medium6". ```yaml @@ -497,6 +531,7 @@ Accept wildcard characters: False ``` ### -ReturnRange + If specified, returns the range of cells in the combined sheet, in the format "A1:Z100". ```yaml @@ -512,6 +547,7 @@ Accept wildcard characters: False ``` ### -Show + Opens the Excel file immediately after creation. Convenient for viewing the results instantly without having to search for the file first. ```yaml @@ -527,6 +563,7 @@ Accept wildcard characters: False ``` ### -PassThru + If specified, an object representing the unsaved Excel package will be returned, it then needs to be saved. ```yaml @@ -542,7 +579,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -551,3 +589,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Merge-MultipleSheets.md b/mdhelp/en/merge-multiplesheets.md similarity index 74% rename from mdHelp/en/Merge-MultipleSheets.md rename to mdhelp/en/merge-multiplesheets.md index 71483ec..6c9563c 100644 --- a/mdHelp/en/Merge-MultipleSheets.md +++ b/mdhelp/en/merge-multiplesheets.md @@ -1,34 +1,36 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Merge-MultipleSheets ## SYNOPSIS + Merges Worksheets into a single Worksheet with differences marked up. ## SYNTAX -``` +```text Merge-MultipleSheets [-Path] [[-Startrow] ] [[-Headername] ] [-NoHeader] [[-WorksheetName] ] [[-OutputFile] ] [[-OutputSheetName] ] [[-Property] ] [[-ExcludeProperty] ] [[-Key] ] [[-KeyFontColor] ] [[-ChangeBackgroundColor] ] [[-DeleteBackgroundColor] ] [[-AddBackgroundColor] ] [-HideRowNumbers] [-Passthru] [-Show] [] ``` ## DESCRIPTION + The Merge Worksheet command combines two sheets. Merge-MultipleSheets is designed to merge more than two. -If asked to merge sheets A,B,C which contain Services, with a Name, Displayname and Start mode, where "Name" is treated as the key, Merge-MultipleSheets: +If asked to merge sheets A,B,C which contain Services, with a Name, Displayname and Start mode, where "Name" is treated as the key, Merge-MultipleSheets: -* Calls Merge-Worksheet to merge "Name", "Displayname" and "Startmode" from sheets A and C; the result has column headings "_Row", "Name", "DisplayName", "Startmode", "C-DisplayName", "C-StartMode", "C-Is" and "C-Row". -* Calls Merge-Worksheet again passing it the intermediate result and sheet B, comparing "Name", "Displayname" and "Start mode" columns on each side, and gets a result with columns "_Row", "Name", "DisplayName", "Startmode", "B-DisplayName", "B-StartMode", "B-Is", "B-Row", "C-DisplayName", "C-StartMode", "C-Is" and "C-Row". -Any columns on the "reference" side which are not used in the comparison are added on the right, which is why we compare the sheets in reverse order. +* Calls Merge-Worksheet to merge "Name", "Displayname" and "Startmode" from sheets A and C; the result has column headings "\_Row", "Name", "DisplayName", "Startmode", "C-DisplayName", "C-StartMode", "C-Is" and "C-Row". +* Calls Merge-Worksheet again passing it the intermediate result and sheet B, comparing "Name", "Displayname" and "Start mode" columns on each side, and gets a result with columns "\_Row", "Name", "DisplayName", "Startmode", "B-DisplayName", "B-StartMode", "B-Is", "B-Row", "C-DisplayName", "C-StartMode", "C-Is" and "C-Row". -The "Is" columns hold "Same", "Added", "Removed" or "Changed" and is used for conditional formatting in the output sheet (these columns are hidden by default), and when the data is written to Excel the "reference" columns, in this case "DisplayName" and "Start" are renamed to reflect their source, so they become "A-DisplayName" and "A-Start". + Any columns on the "reference" side which are not used in the comparison are added on the right, which is why we compare the sheets in reverse order. -Conditional formatting is also applied to the Key column ("Name" in this case) so the view can be filtered to rows with changes by filtering this -column on color. +The "Is" columns hold "Same", "Added", "Removed" or "Changed" and is used for conditional formatting in the output sheet \(these columns are hidden by default\), and when the data is written to Excel the "reference" columns, in this case "DisplayName" and "Start" are renamed to reflect their source, so they become "A-DisplayName" and "A-Start". + +Conditional formatting is also applied to the Key column \("Name" in this case\) so the view can be filtered to rows with changes by filtering this column on color. Note: the processing order can affect what is seen as a change.For example, if there is an extra item in sheet B in the example above, Sheet C will be processed first and that row and will not be seen to be missing. When sheet B is processed it is marked as an addition, and the conditional formatting marks the entries from sheet A to show that a values were added in at least one sheet. @@ -37,34 +39,34 @@ However if Sheet B is the reference sheet, A and C will be seen to have an item ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> dir Server*.xlsx | Merge-MulipleSheets -WorksheetName Services -OutputFile Test2.xlsx -OutputSheetName Services -Show ``` -Here we are auditing servers and each one has a workbook in the current directory which contains a "Services" Worksheet (the result of Get-WmiObject -Class win32_service | Select-Object -Property Name, Displayname, Startmode). No key is specified so the key is assumed to be the "Name" column. The files are merged and the result is opened on completion. +Here we are auditing servers and each one has a workbook in the current directory which contains a "Services" Worksheet \(the result of Get-WmiObject -Class win32\_service \| Select-Object -Property Name, Displayname, Startmode\). No key is specified so the key is assumed to be the "Name" column. The files are merged and the result is opened on completion. ### EXAMPLE 2 -``` + +```text PS\> dir Serv*.xlsx | Merge-MulipleSheets -WorksheetName Software -Key "*" -ExcludeProperty Install* -OutputFile Test2.xlsx -OutputSheetName Software -Show ``` -The server audit files in the previous example also have "Software" worksheet, but no single field on that sheet works as a key. Specifying "*" for the key -produces a compound key using all non-excluded fields (and the installation date and file location are excluded). +The server audit files in the previous example also have "Software" worksheet, but no single field on that sheet works as a key. Specifying "\*" for the key produces a compound key using all non-excluded fields \(and the installation date and file location are excluded\). ### EXAMPLE 3 -``` + +```text Merge-MulipleSheets -Path hotfixes.xlsx -WorksheetName Serv* -Key hotfixid -OutputFile test2.xlsx -OutputSheetName hotfixes -HideRowNumbers -Show ``` -This time all the servers have written their hotfix information to their own worksheets in a shared Excel workbook named "Hotfixes.xlsx" (the information was -obtained by running Get-Hotfix | Sort-Object -Property description,hotfixid | Select-Object -Property Description,HotfixID) -This ignores any sheets which are not named "Serv*", and uses the HotfixID as the key; in this version the row numbers are hidden. +This time all the servers have written their hotfix information to their own worksheets in a shared Excel workbook named "Hotfixes.xlsx" \(the information was obtained by running Get-Hotfix \| Sort-Object -Property description,hotfixid \| Select-Object -Property Description,HotfixID\) This ignores any sheets which are not named "Serv\*", and uses the HotfixID as the key; in this version the row numbers are hidden. ## PARAMETERS ### -Path -Paths to the files to be merged. -Files are also accepted + +Paths to the files to be merged. Files are also accepted ```yaml Type: Object @@ -79,6 +81,7 @@ Accept wildcard characters: False ``` ### -Startrow + The row from where we start to import data, all rows above the Start row are disregarded. By default this is the first row. ```yaml @@ -94,6 +97,7 @@ Accept wildcard characters: False ``` ### -Headername + Specifies custom property names to use, instead of the values defined in the column headers of the Start row. ```yaml @@ -109,7 +113,8 @@ Accept wildcard characters: False ``` ### -NoHeader -If specified, property names will be automatically generated (P1, P2, P3, ..) instead of using the values from the start row. + +If specified, property names will be automatically generated \(P1, P2, P3, ..\) instead of using the values from the start row. ```yaml Type: SwitchParameter @@ -124,7 +129,8 @@ Accept wildcard characters: False ``` ### -WorksheetName -Name(s) of Worksheets to compare. + +Name\(s\) of Worksheets to compare. ```yaml Type: Object @@ -139,6 +145,7 @@ Accept wildcard characters: False ``` ### -OutputFile + File to write output to. ```yaml @@ -154,6 +161,7 @@ Accept wildcard characters: False ``` ### -OutputSheetName + Name of Worksheet to output - if none specified will use the reference Worksheet name. ```yaml @@ -169,7 +177,8 @@ Accept wildcard characters: False ``` ### -Property -Properties to include in the comparison - supports wildcards, default is "*". + +Properties to include in the comparison - supports wildcards, default is "\*". ```yaml Type: Object @@ -184,6 +193,7 @@ Accept wildcard characters: False ``` ### -ExcludeProperty + Properties to exclude from the the comparison - supports wildcards. ```yaml @@ -199,6 +209,7 @@ Accept wildcard characters: False ``` ### -Key + Name of a column which is unique used to pair up rows from the reference and difference sides, default is "Name". ```yaml @@ -214,6 +225,7 @@ Accept wildcard characters: False ``` ### -KeyFontColor + Sets the font color for the Key field; this means you can filter by color to get only changed rows. ```yaml @@ -229,6 +241,7 @@ Accept wildcard characters: False ``` ### -ChangeBackgroundColor + Sets the background color for changed rows. ```yaml @@ -244,6 +257,7 @@ Accept wildcard characters: False ``` ### -DeleteBackgroundColor + Sets the background color for rows in the reference but deleted from the difference sheet. ```yaml @@ -259,6 +273,7 @@ Accept wildcard characters: False ``` ### -AddBackgroundColor + Sets the background color for rows not in the reference but added to the difference sheet. ```yaml @@ -274,6 +289,7 @@ Accept wildcard characters: False ``` ### -HideRowNumbers + If specified, hides the columns in the spreadsheet that contain the row numbers. ```yaml @@ -289,7 +305,8 @@ Accept wildcard characters: False ``` ### -Passthru -If specified, outputs the data to the pipeline (you can add -whatif so it the command only outputs to the pipeline). + +If specified, outputs the data to the pipeline \(you can add -whatif so it the command only outputs to the pipeline\). ```yaml Type: SwitchParameter @@ -304,6 +321,7 @@ Accept wildcard characters: False ``` ### -Show + If specified, opens the output workbook. ```yaml @@ -319,7 +337,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -328,3 +347,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Merge-Worksheet.md b/mdhelp/en/merge-worksheet.md similarity index 89% rename from mdHelp/en/Merge-Worksheet.md rename to mdhelp/en/merge-worksheet.md index 8821125..8e0afe3 100644 --- a/mdHelp/en/Merge-Worksheet.md +++ b/mdhelp/en/merge-worksheet.md @@ -1,61 +1,71 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Merge-Worksheet ## SYNOPSIS -Merges two Worksheets (or other objects) into a single Worksheet with differences marked up. + +Merges two Worksheets \(or other objects\) into a single Worksheet with differences marked up. ## SYNTAX ### C -``` + +```text Merge-Worksheet [-Referencefile] [-Differencefile] [[-WorksheetName] ] [-Startrow ] [-NoHeader] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### B -``` + +```text Merge-Worksheet [-Referencefile] [-Differencefile] [[-WorksheetName] ] [-Startrow ] -Headername [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### A -``` + +```text Merge-Worksheet [-Referencefile] [-Differencefile] [[-WorksheetName] ] [-Startrow ] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### G -``` + +```text Merge-Worksheet [-Differencefile] [[-WorksheetName] ] [-Startrow ] [-NoHeader] -ReferenceObject [[-DiffPrefix] ] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### F -``` + +```text Merge-Worksheet [-Differencefile] [[-WorksheetName] ] [-Startrow ] -Headername -ReferenceObject [[-DiffPrefix] ] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### E -``` + +```text Merge-Worksheet [-Differencefile] [[-WorksheetName] ] [-Startrow ] -ReferenceObject [[-DiffPrefix] ] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ### D -``` + +```text Merge-Worksheet -ReferenceObject [-DifferenceObject] [[-DiffPrefix] ] [[-OutputFile] ] [[-OutputSheetName] ] [-Property ] [-ExcludeProperty ] [-Key ] [-KeyFontColor ] [-ChangeBackgroundColor ] [-DeleteBackgroundColor ] [-AddBackgroundColor ] [-HideEqual] [-Passthru] [-Show] [-WhatIf] [-Confirm] [] ``` ## DESCRIPTION + The Compare-Worksheet command takes two Worksheets and marks differences in the source document, and optionally outputs a grid showing the changes. -By contrast the Merge-Worksheet command takes the Worksheets and combines them into a single sheet showing the old and new data side by side. Although it is designed to work with Excel data it can work with arrays of any kind of object; so it can be a merge *of* Worksheets, or a merge *to* a Worksheet. +By contrast the Merge-Worksheet command takes the Worksheets and combines them into a single sheet showing the old and new data side by side. Although it is designed to work with Excel data it can work with arrays of any kind of object; so it can be a merge _of_ Worksheets, or a merge _to_ a Worksheet. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Merge-Worksheet "Server54.xlsx" "Server55.xlsx" -WorksheetName services -OutputFile Services.xlsx -OutputSheetName 54-55 -show ``` @@ -64,32 +74,35 @@ The workbooks contain audit information for two servers, one sheet contains a li This command creates a worksheet named "54-55" in a workbook named "services.xlsx" which shows all the services and their differences, and opens the new workbook in Excel. ### EXAMPLE 2 -``` + +```text PS\> Merge-Worksheet "Server54.xlsx" "Server55.xlsx" -WorksheetName services -OutputFile Services.xlsx -OutputSheetName 54-55 -HideEqual -AddBackgroundColor LightBlue -show ``` This modifies the previous command to hide the equal rows in the output sheet and changes the color used to mark rows added to the second file. ### EXAMPLE 3 -``` + +```text PS\> Merge-Worksheet -OutputFile .\j1.xlsx -OutputSheetName test11 -ReferenceObject (dir .\ImportExcel\4.0.7) -DifferenceObject (dir .\ImportExcel\4.0.8) -Property Length -Show ``` This version compares two directories, and marks what has changed. Because no "Key" property is given, "Name" is assumed to be the key and the only other property examined is length. Files which are added or deleted or have changed size will be highlighed in the output sheet. Changes to dates or other attributes will be ignored. ### EXAMPLE 4 -``` + +```text PS\> Merge-Worksheet -RefO (dir .\ImportExcel\4.0.7) -DiffO (dir .\ImportExcel\4.0.8) -Pr Length | Out-GridView ``` This time no file is written and the results - which include all properties, not just length, are output and sent to Out-Gridview. -This version uses aliases to shorten the parameters, (OutputFileName can be "outFile" and the Sheet can be"OutSheet"; DifferenceObject & ReferenceObject can be -DiffObject & RefObject respectively). +This version uses aliases to shorten the parameters, \(OutputFileName can be "outFile" and the Sheet can be"OutSheet"; DifferenceObject & ReferenceObject can be DiffObject & RefObject respectively\). ## PARAMETERS ### -Referencefile + First Excel file to compare. You can compare two Excel files or two other objects or a reference obhct against a difference file, but not a reference file against an object. works with the following parameter sets * A = Compare two files default headers @@ -109,6 +122,7 @@ Accept wildcard characters: False ``` ### -Differencefile + Second Excel file to compare. Works with paramter sets A,B,C as well as the following * D = Compare two objects; @@ -129,7 +143,8 @@ Accept wildcard characters: False ``` ### -WorksheetName -Name(s) of Worksheets to compare. Applies to all parameter sets EXCEPT D which is two objects (no sheets) + +Name\(s\) of Worksheets to compare. Applies to all parameter sets EXCEPT D which is two objects \(no sheets\) ```yaml Type: Object @@ -144,7 +159,8 @@ Accept wildcard characters: False ``` ### -Startrow -The row from where we start to import data, all rows above the StartRow are disregarded. By default this is the first row. Applies to all sets EXCEPT D which is two objects (no sheets, so no start row ) + +The row from where we start to import data, all rows above the StartRow are disregarded. By default this is the first row. Applies to all sets EXCEPT D which is two objects \(no sheets, so no start row \) ```yaml Type: Int32 @@ -159,22 +175,23 @@ Accept wildcard characters: False ``` ### -Headername + Specifies custom property names to use, instead of the values defined in the column headers of the Start Row. Works with the following parameter sets: * B 2 sheets with user supplied headers * F Compare object + sheet -```yaml -Type: String[] -Parameter Sets: B, F -Aliases: -Required: True -Position: Named -Default value: None -Accept pipeline input: False -Accept wildcard characters: False -``` + \`\`\`yaml + Type: String\[\] + + Parameter Sets: B, F + + Aliases: + +Required: True Position: Named Default value: None Accept pipeline input: False Accept wildcard characters: False + +```text ### -NoHeader Automatically generate property names (P1, P2, P3, ..) instead of using the values the top row of the sheet. Works with parameter sets @@ -193,8 +210,8 @@ Accept wildcard characters: False ``` ### -ReferenceObject -Reference object to compare if a Worksheet is NOT being used. -Reference object can combine with a difference sheet or difference object + +Reference object to compare if a Worksheet is NOT being used. Reference object can combine with a difference sheet or difference object ```yaml Type: Object @@ -209,8 +226,8 @@ Accept wildcard characters: False ``` ### -DifferenceObject -Difference object to compare if a Worksheet is NOT being used for either half. -Can't have a reference sheet and difference object. + +Difference object to compare if a Worksheet is NOT being used for either half. Can't have a reference sheet and difference object. ```yaml Type: Object @@ -225,7 +242,8 @@ Accept wildcard characters: False ``` ### -DiffPrefix -If there isn't a filename to use to label data from the "Difference" side, DiffPrefix is used, it defaults to "=\>" + +If there isn't a filename to use to label data from the "Difference" side, DiffPrefix is used, it defaults to "=>" ```yaml Type: Object @@ -240,6 +258,7 @@ Accept wildcard characters: False ``` ### -OutputFile + File to hold merged data. ```yaml @@ -255,6 +274,7 @@ Accept wildcard characters: False ``` ### -OutputSheetName + Name of Worksheet to output - if none specified will use the reference Worksheet name. ```yaml @@ -270,7 +290,8 @@ Accept wildcard characters: False ``` ### -Property -Properties to include in the DIFF - supports wildcards, default is "*". + +Properties to include in the DIFF - supports wildcards, default is "\*". ```yaml Type: Object @@ -285,6 +306,7 @@ Accept wildcard characters: False ``` ### -ExcludeProperty + Properties to exclude from the the search - supports wildcards. ```yaml @@ -300,6 +322,7 @@ Accept wildcard characters: False ``` ### -Key + Name of a column which is unique used to pair up rows from the refence and difference side, default is "Name". ```yaml @@ -315,6 +338,7 @@ Accept wildcard characters: False ``` ### -KeyFontColor + Sets the font color for the "key" field; this means you can filter by color to get only changed rows. ```yaml @@ -330,6 +354,7 @@ Accept wildcard characters: False ``` ### -ChangeBackgroundColor + Sets the background color for changed rows. ```yaml @@ -345,6 +370,7 @@ Accept wildcard characters: False ``` ### -DeleteBackgroundColor + Sets the background color for rows in the reference but deleted from the difference sheet. ```yaml @@ -360,6 +386,7 @@ Accept wildcard characters: False ``` ### -AddBackgroundColor + Sets the background color for rows not in the reference but added to the difference sheet. ```yaml @@ -375,6 +402,7 @@ Accept wildcard characters: False ``` ### -HideEqual + if specified, hides the rows in the spreadsheet that are equal and only shows changes, added or deleted rows. ```yaml @@ -390,7 +418,8 @@ Accept wildcard characters: False ``` ### -Passthru -If specified, outputs the data to the pipeline (you can add -WhatIf so the command only outputs to the pipeline). + +If specified, outputs the data to the pipeline \(you can add -WhatIf so the command only outputs to the pipeline\). ```yaml Type: SwitchParameter @@ -405,6 +434,7 @@ Accept wildcard characters: False ``` ### -Show + If specified, opens the output workbook. ```yaml @@ -420,8 +450,8 @@ Accept wildcard characters: False ``` ### -WhatIf -Shows what would happen if the cmdlet runs. -The cmdlet is not run. + +Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml Type: SwitchParameter @@ -436,6 +466,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -451,7 +482,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -460,3 +492,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/New-ConditionalFormattingIconSet.md b/mdhelp/en/new-conditionalformattingiconset.md similarity index 87% rename from mdHelp/en/New-ConditionalFormattingIconSet.md rename to mdhelp/en/new-conditionalformattingiconset.md index 2de38f5..fe550fe 100644 --- a/mdHelp/en/New-ConditionalFormattingIconSet.md +++ b/mdhelp/en/new-conditionalformattingiconset.md @@ -1,37 +1,42 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-ConditionalFormattingIconSet ## SYNOPSIS + Creates an object which describes a conditional formatting rule a for 3,4 or 5 icon set. ## SYNTAX -``` +```text New-ConditionalFormattingIconSet [-Range] [[-ConditionalFormat] ] [-Reverse] [] ``` ## DESCRIPTION + Export-Excel takes a -ConditionalFormat parameter which can hold one or more descriptions for conditional formats; this command builds the defintion of a Conditional formatting rule for an icon set. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $cfRange = [OfficeOpenXml.ExcelAddress]::new($topRow, $column, $lastDataRow, $column) PS\> $cfdef = New-ConditionalFormattingIconSet -Range $cfrange -ConditionalFormat ThreeIconSet -IconType Arrows PS\> Export-Excel -ExcelPackage $excel -ConditionalFormat $cfdef -show ``` + The first line creates a range - one column wide in the column $column, running from $topRow to $lastDataRow. The second line creates a definition object using this range and the third uses Export-Excel with an open package to apply the format and save and open the file. ## PARAMETERS ### -Range + The range of cells that the conditional format applies to. ```yaml @@ -47,6 +52,7 @@ Accept wildcard characters: False ``` ### -ConditionalFormat + The type of rule: one of "ThreeIconSet","FourIconSet" or "FiveIconSet" ```yaml @@ -62,6 +68,7 @@ Accept wildcard characters: False ``` ### -Reverse + Use the icons in the reverse order. ```yaml @@ -77,7 +84,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -87,6 +95,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Add-Add-ConditionalFormatting]() -[New-ConditionalText]() +[Add-Add-ConditionalFormatting](new-conditionalformattingiconset.md) [New-ConditionalText](new-conditionalformattingiconset.md) diff --git a/mdHelp/en/New-ConditionalText.md b/mdhelp/en/new-conditionaltext.md similarity index 78% rename from mdHelp/en/New-ConditionalText.md rename to mdhelp/en/new-conditionaltext.md index fb55d6b..236c16a 100644 --- a/mdHelp/en/New-ConditionalText.md +++ b/mdhelp/en/new-conditionaltext.md @@ -1,53 +1,56 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-ConditionalText ## SYNOPSIS + Creates an object which describes a conditional formatting rule for single valued rules. ## SYNTAX -``` +```text New-ConditionalText [[-Text] ] [[-ConditionalTextColor] ] [[-BackgroundColor] ] [[-Range] ] [[-PatternType] ] [[-ConditionalType] ] [] ``` ## DESCRIPTION -Some Conditional formatting rules don't apply styles to a cell (IconSets and Databars); some take two parameters (Between); some take none (ThisWeek, ContainsErrors, AboveAverage etc).The others take a single parameter (Top, BottomPercent, GreaterThan, Contains etc). -This command creates an object to describe the last two categories, which can then be passed to Export-Excel. +Some Conditional formatting rules don't apply styles to a cell \(IconSets and Databars\); some take two parameters \(Between\); some take none \(ThisWeek, ContainsErrors, AboveAverage etc\).The others take a single parameter \(Top, BottomPercent, GreaterThan, Contains etc\). + +This command creates an object to describe the last two categories, which can then be passed to Export-Excel. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $ct = New-ConditionalText -Text 'Ferrari' PS\> Export-Excel -ExcelPackage $excel -ConditionalTest $ct -show - ``` The first line creates a definition object which will highlight the word "Ferrari" in any cell. and the second uses Export-Excel with an open package to apply the format and save and open the file. ### EXAMPLE 2 -``` + +```text PS\> $ct = New-ConditionalText -Text "Ferrari" PS\> $ct2 = New-ConditionalText -Range $worksheet.Names\["FinishPosition"\].Address -ConditionalType LessThanOrEqual -Text 3 -ConditionalTextColor Red -BackgroundColor White PS\> Export-Excel -ExcelPackage $excel -ConditionalText $ct,$ct2 -show ``` - -This builds on the previous example, and specifies a condition of \<=3 with a format of red text on a white background; this applies to a named range "Finish Position". +This builds on the previous example, and specifies a condition of \<=3 with a format of red text on a white background; this applies to a named range "Finish Position". The range could be written -Range "C:C" to specify a named column, or -Range "C2:C102" to specify certain cells in the column. ## PARAMETERS ### -Text -The text (or other value) to use in the rule. Note that Equals, GreaterThan/LessThan rules require text to wrapped in double quotes. + +The text \(or other value\) to use in the rule. Note that Equals, GreaterThan/LessThan rules require text to wrapped in double quotes. ```yaml Type: Object @@ -62,6 +65,7 @@ Accept wildcard characters: False ``` ### -ConditionalTextColor + The font color for the cell - by default: "DarkRed". ```yaml @@ -77,6 +81,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + The fill color for the cell - by default: "LightPink". ```yaml @@ -92,6 +97,7 @@ Accept wildcard characters: False ``` ### -Range + The range of cells that the conditional format applies to; if none is specified the range will be apply to all the data in the sheet. ```yaml @@ -107,6 +113,7 @@ Accept wildcard characters: False ``` ### -PatternType + The background pattern for the cell - by default: "Solid" ```yaml @@ -123,6 +130,7 @@ Accept wildcard characters: False ``` ### -ConditionalType + One of the supported rules; by default "ContainsText" is selected. ```yaml @@ -138,7 +146,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -148,6 +157,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Add-ConditionalFormatting]() -[New-ConditionalFormattingIconSet]() +[Add-ConditionalFormatting](new-conditionaltext.md) [New-ConditionalFormattingIconSet](new-conditionaltext.md) diff --git a/mdHelp/en/New-ExcelChartDefinition.md b/mdhelp/en/new-excelchartdefinition.md similarity index 94% rename from mdHelp/en/New-ExcelChartDefinition.md rename to mdhelp/en/new-excelchartdefinition.md index fbaac1e..bc2bbcd 100644 --- a/mdHelp/en/New-ExcelChartDefinition.md +++ b/mdhelp/en/new-excelchartdefinition.md @@ -1,29 +1,31 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-ExcelChartDefinition ## SYNOPSIS + Creates a Definition of a chart which can be added using Export-Excel, or Add-PivotTable ## SYNTAX -``` +```text New-ExcelChartDefinition [[-Title] ] [[-Header] ] [[-ChartType] ] [[-ChartTrendLine] ] [[-XRange] ] [[-YRange] ] [[-Width] ] [[-Height] ] [[-Row] ] [[-RowOffSetPixels] ] [[-Column] ] [[-ColumnOffSetPixels] ] [[-LegendPosition] ] [[-LegendSize] ] [-LegendBold] [-NoLegend] [-ShowCategory] [-ShowPercent] [[-SeriesHeader] ] [-TitleBold] [[-TitleSize] ] [[-XAxisTitleText] ] [-XAxisTitleBold] [[-XAxisTitleSize] ] [[-XAxisNumberformat] ] [[-XMajorUnit] ] [[-XMinorUnit] ] [[-XMaxValue] ] [[-XMinValue] ] [[-XAxisPosition] ] [[-YAxisTitleText] ] [-YAxisTitleBold] [[-YAxisTitleSize] ] [[-YAxisNumberformat] ] [[-YMajorUnit] ] [[-YMinorUnit] ] [[-YMaxValue] ] [[-YMinValue] ] [[-YAxisPosition] ] [] ``` ## DESCRIPTION -All the parameters which are passed to Add-ExcelChart can be added to a chart-definition object and passed to Export-Excel with the -ExcelChartDefinition parameter, -or to Add-PivotTable with the -PivotChartDefinition parameter. This command sets up those definition objects. + +All the parameters which are passed to Add-ExcelChart can be added to a chart-definition object and passed to Export-Excel with the -ExcelChartDefinition parameter, or to Add-PivotTable with the -PivotChartDefinition parameter. This command sets up those definition objects. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $cDef = New-ExcelChartDefinition -ChartType line -XRange "X" -YRange "Sinx" -Title "Graph of Sine X" -TitleBold -TitleSize 14 -Column 2 -ColumnOffSetPixels 35 -Width 800 -XAxisTitleText "Degrees" -XAxisTitleBold -XAxisTitleSize 12 -XMajorUnit 30 -XMinorUnit 10 -XMinValue 0 -XMaxValue 361 -XAxisNumberformat "000" -YMinValue -1.25 -YMaxValue 1.25 -YMajorUnit 0.25 -YAxisNumberformat "0.00" -YAxisTitleText "Sine" -YAxisTitleBold -YAxisTitleSize 12 -SeriesHeader "Sin(x)" -LegendSize 8 -legendBold -LegendPosition Bottom PS\> 0..360 | ForEach-Object {[pscustomobject][ordered]@{x = $_; Sinx = "=Sin(Radians(x)) "}} | Export-Excel -AutoNameRange -now -WorkSheetname SinX -ExcelChartDefinition $cDef -Show ``` @@ -33,6 +35,7 @@ This reworks an example from Add-Excel-Chart but here the chart is defined and t ## PARAMETERS ### -Title + The title for the chart. ```yaml @@ -48,6 +51,7 @@ Accept wildcard characters: False ``` ### -Header + No longer used. This may be removed in future versions. ```yaml @@ -63,6 +67,7 @@ Accept wildcard characters: False ``` ### -ChartType + One of the built-in chart types, such as Pie, ClusteredColumn, Line etc. Defaults to "ColumnStacked". ```yaml @@ -79,6 +84,7 @@ Accept wildcard characters: False ``` ### -ChartTrendLine + Superimposes one of Excel's trenline types on the chart. ```yaml @@ -95,6 +101,7 @@ Accept wildcard characters: False ``` ### -XRange + The range of cells containing values for the X-Axis - usually labels. ```yaml @@ -110,7 +117,8 @@ Accept wildcard characters: False ``` ### -YRange -The range(s) of cells holding values for the Y-Axis - usually "data". + +The range\(s\) of cells holding values for the Y-Axis - usually "data". ```yaml Type: Object @@ -125,6 +133,7 @@ Accept wildcard characters: False ``` ### -Width + Width of the chart in pixels. Defaults to 500. ```yaml @@ -140,6 +149,7 @@ Accept wildcard characters: False ``` ### -Height + Height of the chart in pixels. Defaults to 350. ```yaml @@ -155,6 +165,7 @@ Accept wildcard characters: False ``` ### -Row + Row position of the top left corner of the chart. 0 places it at the top of the sheet, 1 below row 1 and so on. ```yaml @@ -170,6 +181,7 @@ Accept wildcard characters: False ``` ### -RowOffSetPixels + Offset to position the chart by a fraction of a row. ```yaml @@ -185,6 +197,7 @@ Accept wildcard characters: False ``` ### -Column + Column position of the top left corner of the chart. 0 places it at the edge of the sheet, 1 to the right of column A and so on. ```yaml @@ -200,6 +213,7 @@ Accept wildcard characters: False ``` ### -ColumnOffSetPixels + Offset to position the chart by a fraction of a column. ```yaml @@ -215,6 +229,7 @@ Accept wildcard characters: False ``` ### -LegendPosition + Location of the key, either "Left", "Right", "Top", "Bottom" or "TopRight". ```yaml @@ -231,6 +246,7 @@ Accept wildcard characters: False ``` ### -LegendSize + Font size for the key. ```yaml @@ -246,6 +262,7 @@ Accept wildcard characters: False ``` ### -LegendBold + Sets the key in bold type. ```yaml @@ -261,6 +278,7 @@ Accept wildcard characters: False ``` ### -NoLegend + If specified, turns off display of the key. If you only have one data series it may be preferable to use the title to say what the chart is. ```yaml @@ -276,6 +294,7 @@ Accept wildcard characters: False ``` ### -ShowCategory + Attaches a category label in charts which support this. ```yaml @@ -291,6 +310,7 @@ Accept wildcard characters: False ``` ### -ShowPercent + Attaches a percentage label in charts which support this. ```yaml @@ -306,7 +326,8 @@ Accept wildcard characters: False ``` ### -SeriesHeader -Specifies explicit name(s) for the data series, which will appear in the legend/key + +Specifies explicit name\(s\) for the data series, which will appear in the legend/key ```yaml Type: Object @@ -321,6 +342,7 @@ Accept wildcard characters: False ``` ### -TitleBold + Sets the title in bold face. ```yaml @@ -336,6 +358,7 @@ Accept wildcard characters: False ``` ### -TitleSize + Sets the point size for the title. ```yaml @@ -351,6 +374,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleText + Specifies a title for the X-axis. ```yaml @@ -366,6 +390,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleBold + Sets the X-axis title in bold face. ```yaml @@ -381,6 +406,7 @@ Accept wildcard characters: False ``` ### -XAxisTitleSize + Sets the font size for the axis title. ```yaml @@ -396,7 +422,8 @@ Accept wildcard characters: False ``` ### -XAxisNumberformat -A number formatting string, like "#,##0.00", for numbers along the X-axis. + +A number formatting string, like "\#,\#\#0.00", for numbers along the X-axis. ```yaml Type: String @@ -411,6 +438,7 @@ Accept wildcard characters: False ``` ### -XMajorUnit + Spacing for the major gridlines / tick marks along the X-axis. ```yaml @@ -426,6 +454,7 @@ Accept wildcard characters: False ``` ### -XMinorUnit + Spacing for the minor gridlines / tick marks along the X-axis. ```yaml @@ -441,6 +470,7 @@ Accept wildcard characters: False ``` ### -XMaxValue + Maximum value for the scale along the X-axis. ```yaml @@ -456,6 +486,7 @@ Accept wildcard characters: False ``` ### -XMinValue + Minimum value for the scale along the X-axis. ```yaml @@ -471,7 +502,8 @@ Accept wildcard characters: False ``` ### -XAxisPosition -Position for the X-axis ("Top" or" Bottom"). + +Position for the X-axis \("Top" or" Bottom"\). ```yaml Type: eAxisPosition @@ -487,6 +519,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleText + Specifies a title for the Y-axis. ```yaml @@ -502,6 +535,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleBold + Sets the Y-axis title in bold face. ```yaml @@ -517,6 +551,7 @@ Accept wildcard characters: False ``` ### -YAxisTitleSize + Sets the font size for the Y-axis title. ```yaml @@ -532,7 +567,8 @@ Accept wildcard characters: False ``` ### -YAxisNumberformat -A number formatting string, like "#,##0.00", for numbers on the Y-axis + +A number formatting string, like "\#,\#\#0.00", for numbers on the Y-axis ```yaml Type: String @@ -547,6 +583,7 @@ Accept wildcard characters: False ``` ### -YMajorUnit + Spacing for the major gridlines / tick marks on the Y-axis. ```yaml @@ -562,6 +599,7 @@ Accept wildcard characters: False ``` ### -YMinorUnit + Spacing for the minor gridlines / tick marks on the Y-axis. ```yaml @@ -577,6 +615,7 @@ Accept wildcard characters: False ``` ### -YMaxValue + Maximum value on the Y-axis. ```yaml @@ -592,6 +631,7 @@ Accept wildcard characters: False ``` ### -YMinValue + Minimum value on the Y-axis. ```yaml @@ -607,7 +647,8 @@ Accept wildcard characters: False ``` ### -YAxisPosition -Position for the Y-axis ("Left" or "Right"). + +Position for the Y-axis \("Left" or "Right"\). ```yaml Type: eAxisPosition @@ -623,7 +664,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -632,3 +674,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/New-PivotTableDefinition.md b/mdhelp/en/new-pivottabledefinition.md similarity index 93% rename from mdHelp/en/New-PivotTableDefinition.md rename to mdhelp/en/new-pivottabledefinition.md index ea885c7..cc96c6e 100644 --- a/mdHelp/en/New-PivotTableDefinition.md +++ b/mdhelp/en/new-pivottabledefinition.md @@ -1,28 +1,32 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-PivotTableDefinition ## SYNOPSIS + Creates PivotTable definitons for Export-Excel ## SYNTAX ### ChartbyDef -``` + +```text New-PivotTableDefinition -PivotTableName [-SourceWorkSheet ] [-SourceRange ] [-PivotRows ] [-PivotData ] [-PivotColumns ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTotals ] [-NoTotalsInPivot] [-GroupDateRow ] [-GroupDatePart ] [-GroupNumericRow ] [-GroupNumericMin ] [-GroupNumericMax ] [-GroupNumericInterval ] [-PivotNumberFormat ] [-PivotTableStyle ] -PivotChartDefinition [-Activate] [] ``` ### ChartbyParams -``` + +```text New-PivotTableDefinition -PivotTableName [-SourceWorkSheet ] [-SourceRange ] [-PivotRows ] [-PivotData ] [-PivotColumns ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTotals ] [-NoTotalsInPivot] [-GroupDateRow ] [-GroupDatePart ] [-GroupNumericRow ] [-GroupNumericMin ] [-GroupNumericMax ] [-GroupNumericInterval ] [-PivotNumberFormat ] [-PivotTableStyle ] [-IncludePivotChart] [-ChartTitle ] [-ChartHeight ] [-ChartWidth ] [-ChartRow ] [-ChartColumn ] [-ChartRowOffSetPixels ] [-ChartColumnOffSetPixels ] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-Activate] [] ``` ## DESCRIPTION + Export-Excel allows a single PivotTable to be defined using the parameters -IncludePivotTable, -PivotColumns, -PivotRows, -PivotData, -PivotFilter, -PivotTotals, -PivotDataToColumn, -IncludePivotChart and -ChartType. Its -PivotTableDefintion paramater allows multiple PivotTables to be defined, with additional parameters. New-PivotTableDefinition is a convenient way to build these definitions. @@ -30,18 +34,21 @@ Its -PivotTableDefintion paramater allows multiple PivotTables to be defined, wi ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $pt = New-PivotTableDefinition -PivotTableName "PT1" -SourceWorkSheet "Sheet1" -PivotRows "Status" -PivotData @{Status='Count'} -PivotFilter 'StartType' -IncludePivotChart -ChartType BarClustered3D PS\> $Pt += New-PivotTableDefinition -PivotTableName "PT2" -SourceWorkSheet "Sheet2" -PivotRows "Company" -PivotData @{Company='Count'} -IncludePivotChart -ChartType PieExploded3D -ShowPercent -ChartTitle "Breakdown of processes by company" PS\> Get-Service | Select-Object -Property Status,Name,DisplayName,StartType | Export-Excel -Path .\test.xlsx -AutoSize PS\> Get-Process | Select-Object -Property Name,Company,Handles,CPU,VM | Export-Excel -Path .\test.xlsx -AutoSize -WorksheetName 'sheet2' PS\> $excel = Export-Excel -Path .\test.xlsx -PivotTableDefinition $pt -Show ``` + This is a re-work of one of the examples in Export-Excel - instead of writing out the pivot definition hash-table, it is built by calling New-PivotTableDefinition. ## PARAMETERS ### -PivotTableName + Name for the new pivot table This command previously had a typo - and has an alias to avoid breaking scripts This will be removed in a future release @@ -59,6 +66,7 @@ Accept wildcard characters: False ``` ### -SourceWorkSheet + Worksheet where the data is found ```yaml @@ -74,6 +82,7 @@ Accept wildcard characters: False ``` ### -SourceRange + Address range in the worksheet e.g "A10:F20" - the first row must contain the column names to pivot by: if the range is not specified the whole source sheet will be used. ```yaml @@ -89,6 +98,7 @@ Accept wildcard characters: False ``` ### -PivotRows + Fields to set as rows in the PivotTable ```yaml @@ -104,6 +114,7 @@ Accept wildcard characters: False ``` ### -PivotData + A hash-table in form "FieldName"="Function", where function is one of Average, Count, CountNums, Max, Min, Product, None, StdDev, StdDevP, Sum, Var, VarP ```yaml @@ -119,6 +130,7 @@ Accept wildcard characters: False ``` ### -PivotColumns + Fields to set as columns in the PivotTable ```yaml @@ -134,6 +146,7 @@ Accept wildcard characters: False ``` ### -PivotFilter + Fields to use to filter in the PivotTable ```yaml @@ -149,6 +162,7 @@ Accept wildcard characters: False ``` ### -PivotDataToColumn + If there are multiple datasets in a PivotTable, by default they are shown seperatate rows under the given row heading; this switch makes them seperate columns. ```yaml @@ -164,7 +178,8 @@ Accept wildcard characters: False ``` ### -PivotTotals -By default PivotTables have Totals for each Row (on the right) and for each column at the bottom. This allows just one or neither to be selected. + +By default PivotTables have Totals for each Row \(on the right\) and for each column at the bottom. This allows just one or neither to be selected. ```yaml Type: String @@ -179,6 +194,7 @@ Accept wildcard characters: False ``` ### -NoTotalsInPivot + Included for compatibility - equivalent to -PivotTotals "None" ```yaml @@ -194,7 +210,8 @@ Accept wildcard characters: False ``` ### -GroupDateRow -The name of a row field which should be grouped by parts of the date/time (ignored if GroupDatePart is not specified) + +The name of a row field which should be grouped by parts of the date/time \(ignored if GroupDatePart is not specified\) ```yaml Type: String @@ -209,7 +226,8 @@ Accept wildcard characters: False ``` ### -GroupDatePart -The Part(s) of the date to use in the grouping (ignored if GroupDateRow is not specified) + +The Part\(s\) of the date to use in the grouping \(ignored if GroupDateRow is not specified\) ```yaml Type: eDateGroupBy[] @@ -225,7 +243,8 @@ Accept wildcard characters: False ``` ### -GroupNumericRow -The name of a row field which should be grouped by Number (e.g 0-99, 100-199, 200-299 ) + +The name of a row field which should be grouped by Number \(e.g 0-99, 100-199, 200-299 \) ```yaml Type: String @@ -240,6 +259,7 @@ Accept wildcard characters: False ``` ### -GroupNumericMin + The starting point for grouping ```yaml @@ -255,6 +275,7 @@ Accept wildcard characters: False ``` ### -GroupNumericMax + The endpoint for grouping ```yaml @@ -270,6 +291,7 @@ Accept wildcard characters: False ``` ### -GroupNumericInterval + The interval for grouping ```yaml @@ -285,6 +307,7 @@ Accept wildcard characters: False ``` ### -PivotNumberFormat + Number format to apply to the data cells in the PivotTable ```yaml @@ -300,6 +323,7 @@ Accept wildcard characters: False ``` ### -PivotTableStyle + Apply a table style to the PivotTable ```yaml @@ -316,6 +340,7 @@ Accept wildcard characters: False ``` ### -PivotChartDefinition + Use a chart definition instead of specifying chart settings one by one ```yaml @@ -331,6 +356,7 @@ Accept wildcard characters: False ``` ### -IncludePivotChart + If specified a chart Will be included. ```yaml @@ -346,6 +372,7 @@ Accept wildcard characters: False ``` ### -ChartTitle + Optional title for the pivot chart, by default the title omitted. ```yaml @@ -361,7 +388,8 @@ Accept wildcard characters: False ``` ### -ChartHeight -Height of the chart in Pixels (400 by default) + +Height of the chart in Pixels \(400 by default\) ```yaml Type: Int32 @@ -376,7 +404,8 @@ Accept wildcard characters: False ``` ### -ChartWidth -Width of the chart in Pixels (600 by default) + +Width of the chart in Pixels \(600 by default\) ```yaml Type: Int32 @@ -391,7 +420,8 @@ Accept wildcard characters: False ``` ### -ChartRow -Cell position of the top left corner of the chart, there will be this number of rows above the top edge of the chart (default is 0, chart starts at top edge of row 1). + +Cell position of the top left corner of the chart, there will be this number of rows above the top edge of the chart \(default is 0, chart starts at top edge of row 1\). ```yaml Type: Int32 @@ -406,7 +436,8 @@ Accept wildcard characters: False ``` ### -ChartColumn -Cell position of the top left corner of the chart, there will be this number of cells to the left of the chart (default is 4, chart starts at left edge of column E) + +Cell position of the top left corner of the chart, there will be this number of cells to the left of the chart \(default is 4, chart starts at left edge of column E\) ```yaml Type: Int32 @@ -421,6 +452,7 @@ Accept wildcard characters: False ``` ### -ChartRowOffSetPixels + Vertical offset of the chart from the cell corner. ```yaml @@ -436,6 +468,7 @@ Accept wildcard characters: False ``` ### -ChartColumnOffSetPixels + Horizontal offset of the chart from the cell corner. ```yaml @@ -451,6 +484,7 @@ Accept wildcard characters: False ``` ### -ChartType + Type of chart ```yaml @@ -467,6 +501,7 @@ Accept wildcard characters: False ``` ### -NoLegend + If specified hides the chart legend ```yaml @@ -482,6 +517,7 @@ Accept wildcard characters: False ``` ### -ShowCategory + if specified attaches the category to slices in a pie chart : not supported on all chart types, this may give errors if applied to an unsupported type. ```yaml @@ -497,6 +533,7 @@ Accept wildcard characters: False ``` ### -ShowPercent + If specified attaches percentages to slices in a pie chart. ```yaml @@ -512,6 +549,7 @@ Accept wildcard characters: False ``` ### -Activate + If there is already content in the workbook the sheet with the PivotTable will not be active UNLESS Activate is specified ```yaml @@ -527,7 +565,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -536,3 +575,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Open-ExcelPackage.md b/mdhelp/en/open-excelpackage.md similarity index 87% rename from mdHelp/en/Open-ExcelPackage.md rename to mdhelp/en/open-excelpackage.md index c16d198..86c1429 100644 --- a/mdHelp/en/Open-ExcelPackage.md +++ b/mdhelp/en/open-excelpackage.md @@ -1,22 +1,24 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Open-ExcelPackage ## SYNOPSIS + Returns an ExcelPackage object for the specified XLSX fil.e ## SYNTAX -``` +```text Open-ExcelPackage [-Path] [-KillExcel] [[-Password] ] [-Create] [] ``` ## DESCRIPTION + Import-Excel and Export-Excel open an Excel file, carry out their tasks and close it again. Sometimes it is necessary to open a file and do other work on it. Open-ExcelPackage allows the file to be opened for these tasks. @@ -26,7 +28,8 @@ It takes a -KillExcel switch to make sure Excel is not holding the file open; a ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $excel = Open-ExcelPackage -Path "$env:TEMP\test99.xlsx" -Create PS\> $ws = Add-WorkSheet -ExcelPackage $excel ``` @@ -34,20 +37,20 @@ PS\> $ws = Add-WorkSheet -ExcelPackage $excel This will create a new file in the temp folder if it doesn't already exist. It then adds a worksheet - because no name is specified it will use the default name of "Sheet1" ### EXAMPLE 2 -``` + +```text PS\> $excela= Open-ExcelPackage -path "$xlPath" -Password $password PS\> $sheet1 = $excel.Workbook.Worksheetsa"sheet1" ] PS\> Set-ExcelRange -Range $sheet1.Cells ["E1:S1048576" ], $sheet1.Cells ["V1:V1048576" ] -NFormat ( [cultureinfo ]::CurrentCulture.DateTimeFormat.ShortDatePattern) PS\> Close-ExcelPackage $excel -Show - ``` -This will open the password protected file at $xlPath using the password stored in $Password. -Sheet1 is selected and formatting applied to two blocks of the sheet; then the file is and saved and loaded into Excel. +This will open the password protected file at $xlPath using the password stored in $Password. Sheet1 is selected and formatting applied to two blocks of the sheet; then the file is and saved and loaded into Excel. ## PARAMETERS ### -Path + The path to the file to open. ```yaml @@ -63,6 +66,7 @@ Accept wildcard characters: False ``` ### -KillExcel + If specified, any running instances of Excel will be terminated before opening the file. This may result in lost work, so should be used with caution. ```yaml @@ -78,7 +82,8 @@ Accept wildcard characters: False ``` ### -Password -The password for a protected worksheet, as a \[normal\] string (not a secure string). + +The password for a protected worksheet, as a \[normal\] string \(not a secure string\). ```yaml Type: String @@ -93,6 +98,7 @@ Accept wildcard characters: False ``` ### -Create + By default Open-ExcelPackage will only open an existing file; -Create instructs it to create a new file if required. ```yaml @@ -108,13 +114,16 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.ExcelPackage + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Remove-WorkSheet.md b/mdhelp/en/remove-worksheet.md similarity index 88% rename from mdHelp/en/Remove-WorkSheet.md rename to mdhelp/en/remove-worksheet.md index 5c1f54a..6881114 100644 --- a/mdHelp/en/Remove-WorkSheet.md +++ b/mdhelp/en/remove-worksheet.md @@ -1,46 +1,51 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Remove-WorkSheet ## SYNOPSIS + Removes one or more worksheets from one or more workbooks ## SYNTAX -``` +```text Remove-WorkSheet [[-FullName] ] [[-WorksheetName] ] [-Show] [-WhatIf] [-Confirm] [] ``` ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Remove-WorkSheet -Path Test1.xlsx -WorksheetName Sheet1 ``` Removes the worksheet named 'Sheet1' from 'Test1.xlsx' ### EXAMPLE 2 -``` + +```text PS\> Remove-WorkSheet -Path Test1.xlsx -WorksheetName Sheet1,Target1 ``` Removes the worksheet named 'Sheet1' and 'Target1' from 'Test1.xlsx' ### EXAMPLE 3 -``` + +```text PS\> Remove-WorkSheet -Path Test1.xlsx -WorksheetName Sheet1,Target1 -Show ``` Removes the worksheets and then launches the xlsx in Excel ### EXAMPLE 1 -``` + +```text PS\> dir c:\reports\*.xlsx | Remove-WorkSheet ``` @@ -49,7 +54,8 @@ Removes 'Sheet1' from all the xlsx files in the c:\reports directory ## PARAMETERS ### -FullName -The fully qualified path to the XLSX file(s) + +The fully qualified path to the XLSX file\(s\) ```yaml Type: Object @@ -64,7 +70,8 @@ Accept wildcard characters: False ``` ### -WorksheetName -The worksheet to be removed (sheet1 by default) + +The worksheet to be removed \(sheet1 by default\) ```yaml Type: String[] @@ -79,6 +86,7 @@ Accept wildcard characters: False ``` ### -Show + If specified the file will be opened in excel after the sheet is removed. ```yaml @@ -94,6 +102,7 @@ Accept wildcard characters: False ``` ### -WhatIf + Shows what would happen if the cmdlet runs. The cmdlet is not run. ```yaml @@ -109,6 +118,7 @@ Accept wildcard characters: False ``` ### -Confirm + Prompts you for confirmation before running the cmdlet. ```yaml @@ -124,7 +134,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -133,3 +144,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Select-Worksheet.md b/mdhelp/en/select-worksheet.md similarity index 92% rename from mdHelp/en/Select-Worksheet.md rename to mdhelp/en/select-worksheet.md index f0e93eb..c581e51 100644 --- a/mdHelp/en/Select-Worksheet.md +++ b/mdhelp/en/select-worksheet.md @@ -1,53 +1,61 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Select-Worksheet ## SYNOPSIS + Sets the selected tab in an Excel workbook to be the chosen sheet and unselects all the others. ## SYNTAX ### Package -``` + +```text Select-Worksheet [-ExcelPackage] [-WorksheetName ] [] ``` ### Workbook -``` + +```text Select-Worksheet [-WorksheetName ] [] ``` ### Sheet -``` + +```text Select-Worksheet -ExcelWorksheet [] ``` ## DESCRIPTION + Sometimes when a sheet is added we want it to be the active sheet, sometimes we want the active sheet to be left as it was. Select-Worksheet exists to change which sheet is the selected tab when Excel opens the file. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Select-Worksheet -ExcelWorkbook $ExcelWorkbook -WorksheetName "NewSheet" ``` $ExcelWorkbook holds a workbook object containing a sheet named "NewSheet"; This sheet will become the \[only\] active sheet in the workbook ### EXAMPLE 2 -``` + +```text PS\> Select-Worksheet -ExcelPackage $Pkg -WorksheetName "NewSheet2" ``` $pkg holds an Excel Package, whose workbook contains a sheet named "NewSheet2" This sheet will become the \[only\] active sheet in the workbook. ### EXAMPLE 3 -``` + +```text PS\> Select-Worksheet -ExcelWorksheet $ws ``` @@ -56,6 +64,7 @@ $ws holds an Excel worksheet which will become the \[only\] active sheet in its ## PARAMETERS ### -ExcelPackage + An object representing an ExcelPackage. ```yaml @@ -71,6 +80,7 @@ Accept wildcard characters: False ``` ### -ExcelWorkbook + An Excel workbook to which the Worksheet will be added - a package contains one Workbook so you can use workbook or package as it suits. ```yaml @@ -86,6 +96,7 @@ Accept wildcard characters: False ``` ### -WorksheetName + The name of the worksheet "Sheet1" by default. ```yaml @@ -101,6 +112,7 @@ Accept wildcard characters: False ``` ### -ExcelWorksheet + An object representing an Excel worksheet. ```yaml @@ -116,7 +128,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -125,3 +138,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Send-SQLDataToExcel.md b/mdhelp/en/send-sqldatatoexcel.md similarity index 86% rename from mdHelp/en/Send-SQLDataToExcel.md rename to mdhelp/en/send-sqldatatoexcel.md index aa0067c..0f7b00a 100644 --- a/mdHelp/en/Send-SQLDataToExcel.md +++ b/mdhelp/en/send-sqldatatoexcel.md @@ -1,19 +1,21 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Send-SQLDataToExcel ## SYNOPSIS + Inserts a DataTable - returned by a SQL query - into an ExcelSheet ## SYNTAX -### none (Default) -``` +### none \(Default\) + +```text Send-SQLDataToExcel [-QueryTimeout ] [-Force] [-Path ] [-ExcelPackage ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ] @@ -32,7 +34,8 @@ Send-SQLDataToExcel [-QueryTimeout ] [-Force] [-Path ] [-ExcelPac ``` ### ODBCConnection -``` + +```text Send-SQLDataToExcel -Connection -SQL [-QueryTimeout ] [-Force] [-Path ] [-ExcelPackage ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] @@ -52,50 +55,58 @@ Send-SQLDataToExcel -Connection -SQL [-QueryTimeout ] [ ``` ### SQLConnection -``` + +```text Send-SQLDataToExcel -Connection [-MsSQLserver] [-DataBase ] -SQL [-QueryTimeout ] [-Force] [-Path ] [-ExcelPackage ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ] [-IncludePivotTable] [-PivotTableName ] [-PivotRows ] [-PivotColumns ] [-PivotData ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTableDefinition ] [-IncludePivotChart] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-AutoSize] [-MaxAutoSizeRows ] [-NoClobber] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-NoHeader] [-RangeName ] [-TableName ] [-TableStyle ] [-Barchart] [-PieChart] [-LineChart] [-ColumnChart] [-ExcelChartDefinition ] [-HideSheet ] [-UnHideSheet ] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-KillExcel] [-AutoNameRange] [-StartRow ] [-StartColumn ] [-PassThru] [-Numberformat ] [-ExcludeProperty ] [-NoAliasOrScriptPropeties] [-DisplayPropertySet] [-NoNumberConversion ] [-ConditionalFormat ] [-ConditionalText ] [-Style ] [-CellStyleSB ] [-Activate] [-Now] [-ReturnRange] [-PivotTotals ] [-NoTotalsInPivot] [-ReZip] [] ``` ### ExistingSession -``` + +```text Send-SQLDataToExcel -Session -SQL [-QueryTimeout ] [-Force] [-Path ] [-ExcelPackage ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ] [-IncludePivotTable] [-PivotTableName ] [-PivotRows ] [-PivotColumns ] [-PivotData ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTableDefinition ] [-IncludePivotChart] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-AutoSize] [-MaxAutoSizeRows ] [-NoClobber] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-NoHeader] [-RangeName ] [-TableName ] [-TableStyle ] [-Barchart] [-PieChart] [-LineChart] [-ColumnChart] [-ExcelChartDefinition ] [-HideSheet ] [-UnHideSheet ] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-KillExcel] [-AutoNameRange] [-StartRow ] [-StartColumn ] [-PassThru] [-Numberformat ] [-ExcludeProperty ] [-NoAliasOrScriptPropeties] [-DisplayPropertySet] [-NoNumberConversion ] [-ConditionalFormat ] [-ConditionalText ] [-Style ] [-CellStyleSB ] [-Activate] [-Now] [-ReturnRange] [-PivotTotals ] [-NoTotalsInPivot] [-ReZip] [] ``` ### Pre-FetchedData -``` + +```text Send-SQLDataToExcel [-QueryTimeout ] -DataTable [-Force] [-Path ] [-ExcelPackage ] [-Calculate] [-Show] [-WorksheetName ] [-Password ] [-ClearSheet] [-Append] [-Title ] [-TitleFillPattern ] [-TitleBold] [-TitleSize ] [-TitleBackgroundColor ] [-IncludePivotTable] [-PivotTableName ] [-PivotRows ] [-PivotColumns ] [-PivotData ] [-PivotFilter ] [-PivotDataToColumn] [-PivotTableDefinition ] [-IncludePivotChart] [-ChartType ] [-NoLegend] [-ShowCategory] [-ShowPercent] [-AutoSize] [-MaxAutoSizeRows ] [-NoClobber] [-FreezeTopRow] [-FreezeFirstColumn] [-FreezeTopRowFirstColumn] [-FreezePane ] [-AutoFilter] [-BoldTopRow] [-NoHeader] [-RangeName ] [-TableName ] [-TableStyle ] [-Barchart] [-PieChart] [-LineChart] [-ColumnChart] [-ExcelChartDefinition ] [-HideSheet ] [-UnHideSheet ] [-MoveToStart] [-MoveToEnd] [-MoveBefore ] [-MoveAfter ] [-KillExcel] [-AutoNameRange] [-StartRow ] [-StartColumn ] [-PassThru] [-Numberformat ] [-ExcludeProperty ] [-NoAliasOrScriptPropeties] [-DisplayPropertySet] [-NoNumberConversion ] [-ConditionalFormat ] [-ConditionalText ] [-Style ] [-CellStyleSB ] [-Activate] [-Now] [-ReturnRange] [-PivotTotals ] [-NoTotalsInPivot] [-ReZip] [] ``` ## DESCRIPTION + This command takes a SQL statement and run it against a database connection; for the connection it accepts either * an object representing a session with a SQL server or ODBC database, or -* a connection string to make a session (if -MSSQLServer is specified it uses the SQL Native client, - and -Connection can be a server name instead of a detailed connection string. Without this switch it uses ODBC) +* a connection string to make a session \(if -MSSQLServer is specified it uses the SQL Native client, -The command takes all the parameters of Export-Excel, except for -InputObject (alias TargetData); after fetching the data it calls Export-Excel with the data as the value of InputParameter and whichever of Export-Excel's parameters it was passed; for details of these parameters see the help for Export-Excel. + and -Connection can be a server name instead of a detailed connection string. Without this switch it uses ODBC\) + +The command takes all the parameters of Export-Excel, except for -InputObject \(alias TargetData\); after fetching the data it calls Export-Excel with the data as the value of InputParameter and whichever of Export-Excel's parameters it was passed; for details of these parameters see the help for Export-Excel. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Send-SQLDataToExcel -MsSQLserver -Connection localhost -SQL "select name,type,type_desc from [master].[sys].[all_objects]" -Path .\temp.xlsx -WorkSheetname master -AutoSize -FreezeTopRow -AutoFilter -BoldTopRow ``` -Connects to the local SQL server and selects 3 columns from \[Sys\].\[all_objects\] and exports then to a sheet named master with some basic header management +Connects to the local SQL server and selects 3 columns from \[Sys\].\[all\_objects\] and exports then to a sheet named master with some basic header management ### EXAMPLE 2 -``` + +```text PS\> $dbPath = 'C:\Users\James\Documents\Database1.accdb' PS\> $Connection = "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=$dbPath;" PS\> $SQL="SELECT top 25 Name,Length From TestData ORDER BY Length DESC" PS\> Send-SQLDataToExcel -Connection $connection -SQL $sql -path .\demo1.xlsx -WorkSheetname "Sizes" -AutoSize ``` -This creates an ODBC connection string to read from an Access file and a SQL Statement to extracts data from it, and sends the resulting data to a new worksheet +This creates an ODBC connection string to read from an Access file and a SQL Statement to extracts data from it, and sends the resulting data to a new worksheet ### EXAMPLE 3 -``` + +```text PS\> $dbPath = 'C:\users\James\Documents\f1Results.xlsx' PS\> $Connection = "Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};Dbq=$dbPath;" @@ -105,10 +116,11 @@ PS\> $SQL="SELECT top 25 DriverName, Count(RaceDate) as Races, Count(Win) as Win PS\>Send-SQLDataToExcel -Connection $connection -SQL $sql -path .\demo2.xlsx -WorkSheetname "Winners" -AutoSize -AutoNameRange -ConditionalFormat @{DataBarColor="Blue"; Range="Wins"} ``` -Similar to the previous example, this creates a connection string, this time for an Excel file, and runs a SQL statement to get a list of motor-racing results, outputting the resulting data to a new spreadsheet. The spreadsheet is formatted and a data bar added to show make the drivers' wins clearer. (The F1 results database is available from https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX_N5sg ) +Similar to the previous example, this creates a connection string, this time for an Excel file, and runs a SQL statement to get a list of motor-racing results, outputting the resulting data to a new spreadsheet. The spreadsheet is formatted and a data bar added to show make the drivers' wins clearer. \(The F1 results database is available from [https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX\_N5sg](https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX_N5sg) \) ### EXAMPLE 4 -``` + +```text PS\> $dbPath = 'C:\users\James\Documents\f1Results.xlsx' PS\> $SQL = "SELECT top 25 DriverName, Count(RaceDate) as Races, Count(Win) as Wins, Count(Pole) as Poles, Count(FastestLap) as Fastlaps " + @@ -117,30 +129,31 @@ PS\> $null = Get-SQL -Session F1 -excel -Connection $dbPath -sql $sql -OutputVar PS\> Send-SQLDataToExcel -DataTable $Table -Path ".\demo3.xlsx" -WorkSheetname Gpwinners -autosize -TableName winners -TableStyle Light6 -show ``` -This uses Get-SQL (at least V1.1 - download from the PowerShell gallery with Install-Module -Name GetSQL - (note the function is Get-SQL the module is GetSQL without the "-" ) -Get-SQL simplifies making database connections and building /submitting SQL statements. Here Get-SQL uses the same SQL statement as before; -OutputVariable leaves a System.Data.DataTable object in $table and Send-SQLDataToExcel puts $table into the worksheet and sets it as an Excel table. -The command is equivalent to running +This uses Get-SQL \(at least V1.1 - download from the PowerShell gallery with Install-Module -Name GetSQL - \(note the function is Get-SQL the module is GetSQL without the "-" \) -PS\> Export-Excel -inputObject $Table -Path ".\demo3.xlsx" -WorkSheetname Gpwinners -autosize -TableName winners -TableStyle Light6 -show +Get-SQL simplifies making database connections and building /submitting SQL statements. Here Get-SQL uses the same SQL statement as before; -OutputVariable leaves a System.Data.DataTable object in $table and Send-SQLDataToExcel puts $table into the worksheet and sets it as an Excel table. The command is equivalent to running -This is quicker than using -PS\> Get-SQL \ | export-excel -ExcludeProperty rowerror,rowstate,table,itemarray,haserrors \ +PS> Export-Excel -inputObject $Table -Path ".\demo3.xlsx" -WorkSheetname Gpwinners -autosize -TableName winners -TableStyle Light6 -show -(the F1 results database is available from https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX_N5sg ) +This is quicker than using PS> Get-SQL \ \| export-excel -ExcludeProperty rowerror,rowstate,table,itemarray,haserrors \ + +\(the F1 results database is available from [https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX\_N5sg](https://1drv.ms/x/s!AhfYu7-CJv4ehNdZWxJE9LMAX_N5sg) \) ### EXAMPLE 5 -``` + +```text PS\>$SQL = "SELECT top 25 DriverName, Count(Win) as Wins FROM Results GROUP BY DriverName ORDER BY (count(win)) DESC" PS\> Send-SQLDataToExcel -Session $DbSessions\["f1"\] -SQL $sql -Path ".\demo3.xlsx" -WorkSheetname Gpwinners -ClearSheet -autosize -ColumnChart ``` -Like the previous example, this uses Get-SQL (download from the gallery with Install-Module -Name GetSQL). It uses the database session which Get-SQL created, rather than an ODBC connection string. The Session parameter can either be a object (as shown here), or the name used by Get-SQL ("F1" in this case). +Like the previous example, this uses Get-SQL \(download from the gallery with Install-Module -Name GetSQL\). It uses the database session which Get-SQL created, rather than an ODBC connection string. The Session parameter can either be a object \(as shown here\), or the name used by Get-SQL \("F1" in this case\). Here the data is presented as a quick chart. ### EXAMPLE 6 -``` + +```text Send-SQLDataToExcel -path .\demo4.xlsx -WorkSheetname "LR" -Connection "DSN=LR" -sql "SELECT name AS CollectionName FROM AgLibraryCollection Collection ORDER BY CollectionName" ``` @@ -149,9 +162,10 @@ This example uses an Existing ODBC datasource name "LR" which maps to an adobe l ## PARAMETERS ### -Connection + A database connection string to be used to create a database session; either -* A Data source name written in the form DSN=ODBC_Data_Source_Name, or +* A Data source name written in the form DSN=ODBC\_Data\_Source\_Name, or * A full ODBC or SQL Native Client Connection string, or * The name of a SQL server. @@ -168,6 +182,7 @@ Accept wildcard characters: False ``` ### -Session + An active ODBC Connection or SQL connection object representing a session with a database which will be queried to get the data . ```yaml @@ -183,6 +198,7 @@ Accept wildcard characters: False ``` ### -MsSQLserver + Specifies the connection string is for SQL server, not ODBC. ```yaml @@ -198,6 +214,7 @@ Accept wildcard characters: False ``` ### -DataBase + Switches to a specific database on a SQL server. ```yaml @@ -213,6 +230,7 @@ Accept wildcard characters: False ``` ### -SQL + The SQL query to run against the session which was passed in -Session or set up from -Connection. ```yaml @@ -228,6 +246,7 @@ Accept wildcard characters: False ``` ### -QueryTimeout + Override the default query time of 30 seconds. ```yaml @@ -243,6 +262,7 @@ Accept wildcard characters: False ``` ### -DataTable + A System.Data.DataTable object containing the data to be inserted into the spreadsheet without running a query. This remains supported to avoid breaking older scripts, but if you have a DataTable object you can pass the it into Export-Excel using -InputObject. ```yaml @@ -258,6 +278,7 @@ Accept wildcard characters: False ``` ### -Force + If specified Export-Excel will be called with parameters specified, even if there is no data to send ```yaml @@ -272,9 +293,9 @@ Accept pipeline input: False Accept wildcard characters: False ``` - ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -284,5 +305,5 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## RELATED LINKS -[Export-Excel]() +[Export-Excel](send-sqldatatoexcel.md) diff --git a/mdHelp/en/Set-ExcelColumn.md b/mdhelp/en/set-excelcolumn.md similarity index 91% rename from mdHelp/en/Set-ExcelColumn.md rename to mdhelp/en/set-excelcolumn.md index 96d0464..375b653 100644 --- a/mdHelp/en/Set-ExcelColumn.md +++ b/mdhelp/en/set-excelcolumn.md @@ -1,28 +1,32 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Set-ExcelColumn ## SYNOPSIS + Adds or modifies a column in an Excel worksheet, filling values, setting formatting and/or creating named ranges. ## SYNTAX ### Package -``` + +```text Set-ExcelColumn -ExcelPackage [-Worksheetname ] [-Column ] [-StartRow ] [-Value ] [-Heading ] [-NumberFormat ] [-BorderAround ] [-FontColor ] [-Bold] [-Italic] [-Underline] [-UnderLineType ] [-StrikeThru] [-FontShift ] [-FontName ] [-FontSize ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-WrapText] [-HorizontalAlignment ] [-VerticalAlignment ] [-TextRotation ] [-AutoSize] [-Width ] [-AutoNameRange] [-Hide] [-Specified] [-PassThru] [] ``` ### sheet -``` + +```text Set-ExcelColumn -Worksheet [-Column ] [-StartRow ] [-Value ] [-Heading ] [-NumberFormat ] [-BorderAround ] [-FontColor ] [-Bold] [-Italic] [-Underline] [-UnderLineType ] [-StrikeThru] [-FontShift ] [-FontName ] [-FontSize ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-WrapText] [-HorizontalAlignment ] [-VerticalAlignment ] [-TextRotation ] [-AutoSize] [-Width ] [-AutoNameRange] [-Hide] [-Specified] [-PassThru] [] ``` ## DESCRIPTION + Set-ExcelColumn can take a value which is either a string containing a value or formula or a scriptblock which evaluates to a string, and optionally a column number and fills that value down the column. A column heading can be specified, and the column can be made a named range. @@ -32,7 +36,8 @@ The column can be formatted in the same operation. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Set-ExcelColumn -Worksheet $ws -Column 5 -NumberFormat 'Currency' ``` @@ -43,24 +48,24 @@ Intelisense will complete the names of predefined number formats. You can see how currency is interpreted on the local computer with the command Expand-NumberFormat currency ### EXAMPLE 2 -``` + +```text PS\> Set-ExcelColumn -Worksheet $ws -Heading "WinsToFastLaps" -Value {"=E$row/C$row"} -Column 7 -AutoSize -AutoNameRange ``` -Here, $WS already contains a worksheet which holds counts of races won and fastest laps recorded by racing drivers (in columns C and E). -Set-ExcelColumn specifies that Column 7 should have a heading of "WinsToFastLaps" and the data cells should contain =E2/C2 , =E3/C3 etc -the new data cells should become a named range, which will also be named "WinsToFastLaps" and the column width will be set automatically. +Here, $WS already contains a worksheet which holds counts of races won and fastest laps recorded by racing drivers \(in columns C and E\). Set-ExcelColumn specifies that Column 7 should have a heading of "WinsToFastLaps" and the data cells should contain =E2/C2 , =E3/C3 etc the new data cells should become a named range, which will also be named "WinsToFastLaps" and the column width will be set automatically. When a value begins with "=", it is treated as a formula. If value is a script block it will be evaluated, so here the string "=E$row/C$Row" will have the number of the current row inserted; see the value parameter for a list of variables which can be used. -Note than when evaluating an expression in a string, it is necessary to wrap it in $() so $row is valid but $($row+1) is needed. +Note than when evaluating an expression in a string, it is necessary to wrap it in $\(\) so $row is valid but $\($row+1\) is needed. To preventVariables merging into other parts of the string, use the back tick "$columnName\`4" will be "G4" - without the backtick the string will look for a variable named "columnName4" ### EXAMPLE 3 -``` + +```text Set-ExcelColumn -Worksheet $ws -Heading "Link" -Value {"https://en.wikipedia.org" + $worksheet.cells["B$Row"].value } -AutoSize ``` @@ -68,12 +73,13 @@ In this example, the worksheet in $ws has partial links to Wikipedia pages in co The -Value parameter is a script block which outputs a string beginning "https..." and ending with the value of the cell at column B in the current row. -When given a valid URI, Set-ExcelColumn makes it a hyperlink. +When given a valid URI, Set-ExcelColumn makes it a hyperlink. The column will be autosized to fit the links. ### EXAMPLE 4 -``` + +```text 4..6 | Set-ExcelColumn -Worksheet $ws -AutoNameRange ``` @@ -82,6 +88,7 @@ Again $ws contains a worksheet. Here columns 4 to 6 are made into named ranges, ## PARAMETERS ### -ExcelPackage + If specifying the worksheet by name, the ExcelPackage object which contains the worksheet also needs to be passed. ```yaml @@ -97,6 +104,7 @@ Accept wildcard characters: False ``` ### -Worksheetname + The sheet to update can be given as a name or an Excel Worksheet object - this sets it by name. ```yaml @@ -112,6 +120,7 @@ Accept wildcard characters: False ``` ### -Worksheet + This passes the worksheet object instead of passing a sheet name and an Excelpackage object. ```yaml @@ -127,6 +136,7 @@ Accept wildcard characters: False ``` ### -Column + Column to fill down - the first column is 1. 0 will be interpreted as first empty column. ```yaml @@ -142,6 +152,7 @@ Accept wildcard characters: False ``` ### -StartRow + First row to fill data in. ```yaml @@ -157,7 +168,8 @@ Accept wildcard characters: False ``` ### -Value -A value, formula or scriptblock to fill in. A script block can use $worksheet, $row, $column \[number\], $columnName \[letter(s)\], $startRow, $startColumn, $endRow, $endColumn. + +A value, formula or scriptblock to fill in. A script block can use $worksheet, $row, $column \[number\], $columnName \[letter\(s\)\], $startRow, $startColumn, $endRow, $endColumn. ```yaml Type: Object @@ -172,6 +184,7 @@ Accept wildcard characters: False ``` ### -Heading + Optional column heading. ```yaml @@ -187,7 +200,8 @@ Accept wildcard characters: False ``` ### -NumberFormat -Number format to apply to cells for example "dd/MM/yyyy HH:mm", "£#,##0.00;\[Red\]-£#,##0.00", "0.00%" , "##/##" or "0.0E+0" etc. + +Number format to apply to cells for example "dd/MM/yyyy HH:mm", "£\#,\#\#0.00;\[Red\]-£\#,\#\#0.00", "0.00%" , "\#\#/\#\#" or "0.0E+0" etc. ```yaml Type: Object @@ -202,6 +216,7 @@ Accept wildcard characters: False ``` ### -BorderAround + Style of border to draw around the row. ```yaml @@ -218,6 +233,7 @@ Accept wildcard characters: False ``` ### -FontColor + Colour for the text - if none specified it will be left as it it is. ```yaml @@ -233,6 +249,7 @@ Accept wildcard characters: False ``` ### -Bold + Make text bold; use -Bold:$false to remove bold. ```yaml @@ -248,7 +265,8 @@ Accept wildcard characters: False ``` ### -Italic -Make text italic; use -Italic:$false to remove italic. + +Make text italic; use -Italic:$false to remove italic. ```yaml Type: SwitchParameter @@ -263,7 +281,8 @@ Accept wildcard characters: False ``` ### -Underline -Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. + +Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. ```yaml Type: SwitchParameter @@ -278,8 +297,8 @@ Accept wildcard characters: False ``` ### -UnderLineType -Specifies whether underlining should be single or double, normal or accounting mode. -The default is "Single". + +Specifies whether underlining should be single or double, normal or accounting mode. The default is "Single". ```yaml Type: ExcelUnderLineType @@ -295,6 +314,7 @@ Accept wildcard characters: False ``` ### -StrikeThru + Strike through text; use -StrikeThru:$false to remove strike through. ```yaml @@ -310,7 +330,8 @@ Accept wildcard characters: False ``` ### -FontShift -Subscript or Superscript (or None). + +Subscript or Superscript \(or None\). ```yaml Type: ExcelVerticalAlignmentFont @@ -326,6 +347,7 @@ Accept wildcard characters: False ``` ### -FontName + Font to use - Excel defaults to Calibri. ```yaml @@ -341,6 +363,7 @@ Accept wildcard characters: False ``` ### -FontSize + Point size for the text. ```yaml @@ -356,6 +379,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + Change background color. ```yaml @@ -371,6 +395,7 @@ Accept wildcard characters: False ``` ### -BackgroundPattern + Background pattern - "Solid" by default. ```yaml @@ -387,6 +412,7 @@ Accept wildcard characters: False ``` ### -PatternColor + Secondary color for background pattern. ```yaml @@ -402,6 +428,7 @@ Accept wildcard characters: False ``` ### -WrapText + Turn on Text-Wrapping; use -WrapText:$false to turn off wrapping. ```yaml @@ -417,6 +444,7 @@ Accept wildcard characters: False ``` ### -HorizontalAlignment + Position cell contents to Left, Right, Center etc. Default is "General". ```yaml @@ -433,6 +461,7 @@ Accept wildcard characters: False ``` ### -VerticalAlignment + Position cell contents to Top, Bottom or Center. ```yaml @@ -449,7 +478,8 @@ Accept wildcard characters: False ``` ### -TextRotation -Degrees to rotate text; up to +90 for anti-clockwise ("upwards"), or to -90 for clockwise. + +Degrees to rotate text; up to +90 for anti-clockwise \("upwards"\), or to -90 for clockwise. ```yaml Type: Int32 @@ -464,6 +494,7 @@ Accept wildcard characters: False ``` ### -AutoSize + Attempt to auto-fit cells to the width their contents. ```yaml @@ -479,6 +510,7 @@ Accept wildcard characters: False ``` ### -Width + Set cells to a fixed width, ignored if -AutoSize is specified. ```yaml @@ -494,6 +526,7 @@ Accept wildcard characters: False ``` ### -AutoNameRange + Set the inserted data to be a named range. ```yaml @@ -509,6 +542,7 @@ Accept wildcard characters: False ``` ### -Hide + Hide the column. ```yaml @@ -524,6 +558,7 @@ Accept wildcard characters: False ``` ### -Specified + If specified, returns the range of cells which were affected. ```yaml @@ -539,6 +574,7 @@ Accept wildcard characters: False ``` ### -PassThru + If specified, return an object representing the Column, to allow further work to be done on it. ```yaml @@ -554,14 +590,18 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.ExcelColumn + ### System.String + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Set-ExcelRange.md b/mdhelp/en/set-excelrange.md similarity index 86% rename from mdHelp/en/Set-ExcelRange.md rename to mdhelp/en/set-excelrange.md index 551b738..6c3b46a 100644 --- a/mdHelp/en/Set-ExcelRange.md +++ b/mdhelp/en/set-excelrange.md @@ -1,44 +1,49 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Set-ExcelRange ## SYNOPSIS + Applies number, font, alignment and/or color formatting, values or formulas to a range of Excel cells. ## SYNTAX -``` +```text Set-ExcelRange [[-Range] ] [-WorkSheet ] [-NumberFormat ] [-BorderAround ] [-BorderColor ] [-BorderBottom ] [-BorderTop ] [-BorderLeft ] [-BorderRight ] [-FontColor ] [-Value ] [-Formula ] [-ArrayFormula] [-ResetFont] [-Bold] [-Italic] [-Underline] [-UnderLineType ] [-StrikeThru] [-FontShift ] [-FontName ] [-FontSize ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-WrapText] [-HorizontalAlignment ] [-VerticalAlignment ] [-TextRotation ] [-AutoSize] [-Width ] [-Height ] [-Hidden] [-Locked] [-Merge] [] ``` ## DESCRIPTION -Set-ExcelRange was created to set the style elements for a range of cells, this includes auto-sizing and hiding, setting font elements (Name, Size, Bold, Italic, Underline & UnderlineStyle and Subscript & SuperScript), font and background colors, borders, text wrapping, rotation, alignment within cells, and number format. -It was orignally named "Set-Format", but it has been extended to set Values, Formulas and ArrayFormulas (sometimes called Ctrl-shift-Enter \[CSE\] formulas); because of this, the name has become Set-ExcelRange but the old name of Set-Format is preserved as an alias. +Set-ExcelRange was created to set the style elements for a range of cells, this includes auto-sizing and hiding, setting font elements \(Name, Size, Bold, Italic, Underline & UnderlineStyle and Subscript & SuperScript\), font and background colors, borders, text wrapping, rotation, alignment within cells, and number format. + +It was orignally named "Set-Format", but it has been extended to set Values, Formulas and ArrayFormulas \(sometimes called Ctrl-shift-Enter \[CSE\] formulas\); because of this, the name has become Set-ExcelRange but the old name of Set-Format is preserved as an alias. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $sheet.Column(3) | Set-ExcelRange -HorizontalAlignment Right -NumberFormat "#,###" -AutoFit ``` -Selects column 3 from a sheet object (within a workbook object, which is a child of the ExcelPackage object) and passes it to Set-ExcelRange which formats numbers as a integers with comma-separated groups, aligns it right, and auto-fits the column to the contents. +Selects column 3 from a sheet object \(within a workbook object, which is a child of the ExcelPackage object\) and passes it to Set-ExcelRange which formats numbers as a integers with comma-separated groups, aligns it right, and auto-fits the column to the contents. ### EXAMPLE 2 -``` + +```text PS\> Set-ExcelRange -Range $sheet.Cells["E1:H1048576"] -HorizontalAlignment Right -NumberFormat "#,###" ``` Instead of piping the address, this version specifies a block of cells and applies similar formatting. ### EXAMPLE 3 -``` + +```text PS\> Set-ExcelRange $excel.Workbook.Worksheets[1].Tables["Processes"] -Italic ``` @@ -47,7 +52,8 @@ This time instead of specifying a range of cells, a table is selected by name an ## PARAMETERS ### -Range -One or more row(s), Column(s) and/or block(s) of cells to format. + +One or more row\(s\), Column\(s\) and/or block\(s\) of cells to format. ```yaml Type: Object @@ -62,6 +68,7 @@ Accept wildcard characters: False ``` ### -WorkSheet + The worksheet where the format is to be applied. ```yaml @@ -77,7 +84,8 @@ Accept wildcard characters: False ``` ### -NumberFormat -Number format to apply to cells for example "dd/MM/yyyy HH:mm", "£#,##0.00;\[Red\]-£#,##0.00", "0.00%" , "##/##" or "0.0E+0" etc. + +Number format to apply to cells for example "dd/MM/yyyy HH:mm", "£\#,\#\#0.00;\[Red\]-£\#,\#\#0.00", "0.00%" , "\#\#/\#\#" or "0.0E+0" etc. ```yaml Type: Object @@ -92,6 +100,7 @@ Accept wildcard characters: False ``` ### -BorderAround + Style of border to draw around the range. ```yaml @@ -108,6 +117,7 @@ Accept wildcard characters: False ``` ### -BorderColor + Color of the border. ```yaml @@ -123,6 +133,7 @@ Accept wildcard characters: False ``` ### -BorderBottom + Style for the bottom border. ```yaml @@ -139,6 +150,7 @@ Accept wildcard characters: False ``` ### -BorderTop + Style for the top border. ```yaml @@ -155,6 +167,7 @@ Accept wildcard characters: False ``` ### -BorderLeft + Style for the left border. ```yaml @@ -171,6 +184,7 @@ Accept wildcard characters: False ``` ### -BorderRight + Style for the right border. ```yaml @@ -187,6 +201,7 @@ Accept wildcard characters: False ``` ### -FontColor + Colour for the text - if none is specified it will be left as it is. ```yaml @@ -202,6 +217,7 @@ Accept wildcard characters: False ``` ### -Value + Value for the cell. ```yaml @@ -217,6 +233,7 @@ Accept wildcard characters: False ``` ### -Formula + Formula for the cell. ```yaml @@ -232,7 +249,8 @@ Accept wildcard characters: False ``` ### -ArrayFormula -Specifies formula should be an array formula (a.k.a CSE \[ctrl-shift-enter\] formula). + +Specifies formula should be an array formula \(a.k.a CSE \[ctrl-shift-enter\] formula\). ```yaml Type: SwitchParameter @@ -247,6 +265,7 @@ Accept wildcard characters: False ``` ### -ResetFont + Clear Bold, Italic, StrikeThrough and Underline and set color to Black. ```yaml @@ -262,6 +281,7 @@ Accept wildcard characters: False ``` ### -Bold + Make text bold; use -Bold:$false to remove bold. ```yaml @@ -277,7 +297,8 @@ Accept wildcard characters: False ``` ### -Italic -Make text italic; use -Italic:$false to remove italic. + +Make text italic; use -Italic:$false to remove italic. ```yaml Type: SwitchParameter @@ -292,7 +313,8 @@ Accept wildcard characters: False ``` ### -Underline -Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. + +Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. ```yaml Type: SwitchParameter @@ -307,6 +329,7 @@ Accept wildcard characters: False ``` ### -UnderLineType + Specifies whether underlining should be single or double, normal or accounting mode. The default is "Single". ```yaml @@ -323,6 +346,7 @@ Accept wildcard characters: False ``` ### -StrikeThru + Strike through text; use -Strikethru:$false to remove Strike through ```yaml @@ -338,7 +362,8 @@ Accept wildcard characters: False ``` ### -FontShift -Subscript or Superscript (or none). + +Subscript or Superscript \(or none\). ```yaml Type: ExcelVerticalAlignmentFont @@ -354,6 +379,7 @@ Accept wildcard characters: False ``` ### -FontName + Font to use - Excel defaults to Calibri. ```yaml @@ -369,6 +395,7 @@ Accept wildcard characters: False ``` ### -FontSize + Point size for the text. ```yaml @@ -384,6 +411,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + Change background color. ```yaml @@ -399,6 +427,7 @@ Accept wildcard characters: False ``` ### -BackgroundPattern + Background pattern - Solid by default. ```yaml @@ -415,6 +444,7 @@ Accept wildcard characters: False ``` ### -PatternColor + Secondary color for background pattern. ```yaml @@ -430,6 +460,7 @@ Accept wildcard characters: False ``` ### -WrapText + Turn on Text-Wrapping; use -WrapText:$false to turn off wrapping. ```yaml @@ -445,8 +476,8 @@ Accept wildcard characters: False ``` ### -HorizontalAlignment -Position cell contents to Left, Right, Center etc. -default is 'General'. + +Position cell contents to Left, Right, Center etc. default is 'General'. ```yaml Type: ExcelHorizontalAlignment @@ -462,6 +493,7 @@ Accept wildcard characters: False ``` ### -VerticalAlignment + Position cell contents to Top, Bottom or Center. ```yaml @@ -478,7 +510,8 @@ Accept wildcard characters: False ``` ### -TextRotation -Degrees to rotate text; up to +90 for anti-clockwise ("upwards"), or to -90 for clockwise. + +Degrees to rotate text; up to +90 for anti-clockwise \("upwards"\), or to -90 for clockwise. ```yaml Type: Int32 @@ -493,7 +526,8 @@ Accept wildcard characters: False ``` ### -AutoSize -Autofit cells to width (columns or ranges only). + +Autofit cells to width \(columns or ranges only\). ```yaml Type: SwitchParameter @@ -508,7 +542,8 @@ Accept wildcard characters: False ``` ### -Width -Set cells to a fixed width (columns or ranges only), ignored if Autosize is specified. + +Set cells to a fixed width \(columns or ranges only\), ignored if Autosize is specified. ```yaml Type: Single @@ -523,7 +558,8 @@ Accept wildcard characters: False ``` ### -Height -Set cells to a fixed height (rows or ranges only). + +Set cells to a fixed height \(rows or ranges only\). ```yaml Type: Single @@ -538,7 +574,8 @@ Accept wildcard characters: False ``` ### -Hidden -Hide a row or column (not a range); use -Hidden:$false to unhide. + +Hide a row or column \(not a range\); use -Hidden:$false to unhide. ```yaml Type: SwitchParameter @@ -553,6 +590,7 @@ Accept wildcard characters: False ``` ### -Locked + Locks cells. Cells are locked by default use -locked:$false on the whole sheet and then lock specific ones, and enable protection on the sheet. ```yaml @@ -568,6 +606,7 @@ Accept wildcard characters: False ``` ### -Merge + Merges cells - it is recommended that you explicitly set -HorizontalAlignment ```yaml @@ -583,7 +622,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -592,3 +632,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Set-ExcelRow.md b/mdhelp/en/set-excelrow.md similarity index 91% rename from mdHelp/en/Set-ExcelRow.md rename to mdhelp/en/set-excelrow.md index 447b37d..5c90532 100644 --- a/mdHelp/en/Set-ExcelRow.md +++ b/mdhelp/en/set-excelrow.md @@ -1,29 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Set-ExcelRow ## SYNOPSIS + Fills values into a \[new\] row in an Excel spreadsheet, and sets row formats. ## SYNTAX ### Package -``` + +```text Set-ExcelRow -ExcelPackage [-Worksheetname ] [-Row ] [-StartColumn ] [-Value ] [-Heading ] [-HeadingBold] [-HeadingSize ] [-NumberFormat ] [-BorderAround ] [-BorderColor ] [-BorderBottom ] [-BorderTop ] [-BorderLeft ] [-BorderRight ] [-FontColor ] [-Bold] [-Italic] [-Underline] [-UnderLineType ] [-StrikeThru] [-FontShift ] [-FontName ] [-FontSize ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-WrapText] [-HorizontalAlignment ] [-VerticalAlignment ] [-TextRotation ] [-Height ] [-Hide] [-ReturnRange] [-PassThru] [] ``` ### Sheet -``` + +```text Set-ExcelRow -Worksheet [-Row ] [-StartColumn ] [-Value ] [-Heading ] [-HeadingBold] [-HeadingSize ] [-NumberFormat ] [-BorderAround ] [-BorderColor ] [-BorderBottom ] [-BorderTop ] [-BorderLeft ] [-BorderRight ] [-FontColor ] [-Bold] [-Italic] [-Underline] [-UnderLineType ] [-StrikeThru] [-FontShift ] [-FontName ] [-FontSize ] [-BackgroundColor ] [-BackgroundPattern ] [-PatternColor ] [-WrapText] [-HorizontalAlignment ] [-VerticalAlignment ] [-TextRotation ] [-Height ] [-Hide] [-ReturnRange] [-PassThru] [] ``` ## DESCRIPTION + Set-ExcelRow accepts either a Worksheet object or an ExcelPackage object returned by Export-Excel and the name of a sheet, and inserts the chosen contents into a row of the sheet. The contents can be a constant, like "42", a formula or a script block which is converted into a constant or a formula. @@ -33,20 +37,22 @@ The first cell of the row can optionally be given a heading. ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> Set-ExcelRow -Worksheet $ws -Heading Total -Value {"=sum($columnName`2:$columnName$endrow)" } ``` $Ws contains a worksheet object, and no Row number is specified so Set-ExcelRow will select the next row after the end of the data in the sheet. -The first cell in the row will contain "Total", and each of the other cells will contain =Sum(xx2:xx99) where xx is the column name, and 99 is the last row of data. +The first cell in the row will contain "Total", and each of the other cells will contain =Sum\(xx2:xx99\) where xx is the column name, and 99 is the last row of data. -Note the use of the backtick in the script block (\`2) to Prevent 2 becoming part of the variable "ColumnName" +Note the use of the backtick in the script block \(\`2\) to Prevent 2 becoming part of the variable "ColumnName" -The script block can use $Worksheet, $Row, $Column (number), $ColumnName (letter), $StartRow/Column and $EndRow/Column. +The script block can use $Worksheet, $Row, $Column \(number\), $ColumnName \(letter\), $StartRow/Column and $EndRow/Column. ### EXAMPLE 2 -``` + +```text PS\> Set-ExcelRow -Worksheet $ws -Heading Total -HeadingBold -Value {"=sum($columnName`2:$columnName$endrow)" } -NumberFormat 'Currency' -StartColumn 2 -Bold -BorderTop Double -BorderBottom Thin ``` @@ -57,6 +63,7 @@ The formula and heading are set in bold face, and the formula is formatted for t ## PARAMETERS ### -ExcelPackage + An Excel package object - for example from Export-Excel -PassThru - if specified requires a sheet name to be passed a parameter. ```yaml @@ -72,6 +79,7 @@ Accept wildcard characters: False ``` ### -Worksheetname + The name of the sheet to update in the package. ```yaml @@ -87,6 +95,7 @@ Accept wildcard characters: False ``` ### -Worksheet + A worksheet object instead of passing a name and package. ```yaml @@ -102,7 +111,8 @@ Accept wildcard characters: False ``` ### -Row -Row to fill right - first row is 1. 0 will be interpreted as first unused row. + +Row to fill right - first row is 1. 0 will be interpreted as first unused row. ```yaml Type: Object @@ -117,6 +127,7 @@ Accept wildcard characters: False ``` ### -StartColumn + Position in the row to start from. ```yaml @@ -132,7 +143,8 @@ Accept wildcard characters: False ``` ### -Value -Value, Formula or ScriptBlock to fill in. A ScriptBlock can use $worksheet, $row, $Column \[number\], $ColumnName \[letter(s)\], $startRow, $startColumn, $endRow, $endColumn. + +Value, Formula or ScriptBlock to fill in. A ScriptBlock can use $worksheet, $row, $Column \[number\], $ColumnName \[letter\(s\)\], $startRow, $startColumn, $endRow, $endColumn. ```yaml Type: Object @@ -147,6 +159,7 @@ Accept wildcard characters: False ``` ### -Heading + Optional row-heading. ```yaml @@ -162,6 +175,7 @@ Accept wildcard characters: False ``` ### -HeadingBold + Set the heading in bold type. ```yaml @@ -177,6 +191,7 @@ Accept wildcard characters: False ``` ### -HeadingSize + Change the font-size of the heading. ```yaml @@ -192,8 +207,8 @@ Accept wildcard characters: False ``` ### -NumberFormat -Number format to apply to cells e.g. -"dd/MM/yyyy HH:mm", "£#,##0.00;\[Red\]-£#,##0.00", "0.00%" , "##/##" , "0.0E+0" etc. + +Number format to apply to cells e.g. "dd/MM/yyyy HH:mm", "£\#,\#\#0.00;\[Red\]-£\#,\#\#0.00", "0.00%" , "\#\#/\#\#" , "0.0E+0" etc. ```yaml Type: Object @@ -208,6 +223,7 @@ Accept wildcard characters: False ``` ### -BorderAround + Style of border to draw around the row. ```yaml @@ -224,6 +240,7 @@ Accept wildcard characters: False ``` ### -BorderColor + Color of the border. ```yaml @@ -239,6 +256,7 @@ Accept wildcard characters: False ``` ### -BorderBottom + Style for the bottom border. ```yaml @@ -255,6 +273,7 @@ Accept wildcard characters: False ``` ### -BorderTop + Style for the top border. ```yaml @@ -271,6 +290,7 @@ Accept wildcard characters: False ``` ### -BorderLeft + Style for the left border. ```yaml @@ -287,6 +307,7 @@ Accept wildcard characters: False ``` ### -BorderRight + Style for the right border. ```yaml @@ -303,6 +324,7 @@ Accept wildcard characters: False ``` ### -FontColor + Color for the text - if not specified the font will be left as it it is. ```yaml @@ -318,6 +340,7 @@ Accept wildcard characters: False ``` ### -Bold + Make text bold; use -Bold:$false to remove bold. ```yaml @@ -333,7 +356,8 @@ Accept wildcard characters: False ``` ### -Italic -Make text italic; use -Italic:$false to remove italic. + +Make text italic; use -Italic:$false to remove italic. ```yaml Type: SwitchParameter @@ -348,7 +372,8 @@ Accept wildcard characters: False ``` ### -Underline -Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. + +Underline the text using the underline style in -UnderlineType; use -Underline:$false to remove underlining. ```yaml Type: SwitchParameter @@ -363,6 +388,7 @@ Accept wildcard characters: False ``` ### -UnderLineType + Specifies whether underlining should be single or double, normal or accounting mode. The default is "Single". ```yaml @@ -379,6 +405,7 @@ Accept wildcard characters: False ``` ### -StrikeThru + Strike through text; use -StrikeThru:$false to remove strike through. ```yaml @@ -394,7 +421,8 @@ Accept wildcard characters: False ``` ### -FontShift -Subscript or Superscript (or none). + +Subscript or Superscript \(or none\). ```yaml Type: ExcelVerticalAlignmentFont @@ -410,6 +438,7 @@ Accept wildcard characters: False ``` ### -FontName + Font to use - Excel defaults to Calibri. ```yaml @@ -425,6 +454,7 @@ Accept wildcard characters: False ``` ### -FontSize + Point size for the text. ```yaml @@ -440,6 +470,7 @@ Accept wildcard characters: False ``` ### -BackgroundColor + Change background color. ```yaml @@ -455,6 +486,7 @@ Accept wildcard characters: False ``` ### -BackgroundPattern + Background pattern - solid by default. ```yaml @@ -471,6 +503,7 @@ Accept wildcard characters: False ``` ### -PatternColor + Secondary color for background pattern. ```yaml @@ -486,6 +519,7 @@ Accept wildcard characters: False ``` ### -WrapText + Turn on Text-Wrapping; use -WrapText:$false to turn off wrapping. ```yaml @@ -501,8 +535,8 @@ Accept wildcard characters: False ``` ### -HorizontalAlignment -Position cell contents to Left, Right, Center etc. -default is 'General'. + +Position cell contents to Left, Right, Center etc. default is 'General'. ```yaml Type: ExcelHorizontalAlignment @@ -518,6 +552,7 @@ Accept wildcard characters: False ``` ### -VerticalAlignment + Position cell contents to Top, Bottom or Center. ```yaml @@ -534,7 +569,8 @@ Accept wildcard characters: False ``` ### -TextRotation -Degrees to rotate text. Up to +90 for anti-clockwise ("upwards"), or to -90 for clockwise. + +Degrees to rotate text. Up to +90 for anti-clockwise \("upwards"\), or to -90 for clockwise. ```yaml Type: Int32 @@ -549,6 +585,7 @@ Accept wildcard characters: False ``` ### -Height + Set cells to a fixed height. ```yaml @@ -564,6 +601,7 @@ Accept wildcard characters: False ``` ### -Hide + Hide the row. ```yaml @@ -579,6 +617,7 @@ Accept wildcard characters: False ``` ### -ReturnRange + If sepecified, returns the range of cells which were affected. ```yaml @@ -594,6 +633,7 @@ Accept wildcard characters: False ``` ### -PassThru + If Specified, return a row object to allow further work to be done. ```yaml @@ -609,14 +649,18 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS ## OUTPUTS ### OfficeOpenXml.ExcelRow + ### System.String + ## NOTES ## RELATED LINKS + diff --git a/mdHelp/en/Update-FirstObjectProperties.md b/mdhelp/en/update-firstobjectproperties.md similarity index 94% rename from mdHelp/en/Update-FirstObjectProperties.md rename to mdhelp/en/update-firstobjectproperties.md index 4fd13a5..c4d7578 100644 --- a/mdHelp/en/Update-FirstObjectProperties.md +++ b/mdhelp/en/update-firstobjectproperties.md @@ -1,21 +1,24 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Update-FirstObjectProperties ## SYNOPSIS + Updates the first object to contain all the properties of the object with the most properties in the array. ## SYNTAX -``` + +```text Update-FirstObjectProperties ``` ## DESCRIPTION + Updates the first object to contain all the properties found anywhere in the array. This is usefull when not all objects have the same quantity of properties and CmdLets like Out-GridView or Export-Excel are not able to show all the properties because the first object doesn't have them all. @@ -23,7 +26,8 @@ This is usefull when not all objects have the same quantity of properties and Cm ## EXAMPLES ### EXAMPLE 1 -``` + +```text PS\> $Array = @() PS\> $Obj1 = [PSCustomObject]@{ Member1 = 'First' @@ -48,7 +52,8 @@ PS\> $Array | Update-FirstObjectProperties | Out-GridView -Title 'All properties Updates the first object of the array by adding Member3 and Member4 and shows before and after in gridviews ### EXAMPLE 2 -``` + +```text PS\>$ExcelParams = @{ Path = $env:TEMP + '\Excel.xlsx' Show = $true @@ -85,8 +90,8 @@ Updates the first object of the array by adding property 'Member3' and 'Member4' ## OUTPUTS ## NOTES -CHANGELOG -2017/06/08 Function born + +CHANGELOG 2017/06/08 Function born ## RELATED LINKS diff --git a/pivot/README.md b/pivot/README.md new file mode 100644 index 0000000..3a53971 --- /dev/null +++ b/pivot/README.md @@ -0,0 +1,2 @@ +# Pivot + diff --git a/Pivot/Pivot.md b/pivot/pivot.md similarity index 86% rename from Pivot/Pivot.md rename to pivot/pivot.md index 1ff8fcd..d90f983 100644 --- a/Pivot/Pivot.md +++ b/pivot/pivot.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Pivot ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Pivot [[-targetData] ] [[-pivotRows] ] [[-pivotData] ] [[-ChartType] ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ChartType -{{ Fill ChartType Description }} ```yaml Type: eChartType @@ -48,7 +44,6 @@ Accept wildcard characters: False ``` ### -pivotData -{{ Fill pivotData Description }} ```yaml Type: Object @@ -63,7 +58,6 @@ Accept wildcard characters: False ``` ### -pivotRows -{{ Fill pivotRows Description }} ```yaml Type: Object @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -targetData -{{ Fill targetData Description }} ```yaml Type: Object @@ -93,7 +86,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -102,6 +96,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/public/README.md b/public/README.md new file mode 100644 index 0000000..557839f --- /dev/null +++ b/public/README.md @@ -0,0 +1,2 @@ +# Public + diff --git a/Public/ConvertFrom-ExcelData.md b/public/convertfrom-exceldata.md similarity index 77% rename from Public/ConvertFrom-ExcelData.md rename to public/convertfrom-exceldata.md index b594cbe..b85ef3e 100644 --- a/Public/ConvertFrom-ExcelData.md +++ b/public/convertfrom-exceldata.md @@ -1,51 +1,51 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # ConvertFrom-ExcelData ## SYNOPSIS + Reads data from a sheet, and for each row, calls a custom scriptblock with a list of property names and the row of data. ## SYNTAX -``` +```text ConvertFrom-ExcelData [-Path] [[-ScriptBlock] ] [[-WorksheetName] ] [[-HeaderRow] ] [[-Header] ] [-NoHeader] [-DataOnly] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### EXAMPLE 1 -``` + +```text ConvertFrom-ExcelData .\testSQLGen.xlsx { ``` -param($propertyNames, $record) +param\($propertyNames, $record\) + +```text +$reportRecord = @() +foreach ($pn in $propertyNames) { + $reportRecord += "{0}: {1}" -f $pn, $record.$pn +} +$reportRecord +="" +$reportRecord -join "\`r\`n" +``` - $reportRecord = @() - foreach ($pn in $propertyNames) { - $reportRecord += "{0}: {1}" -f $pn, $record.$pn - } - $reportRecord +="" - $reportRecord -join "\`r\`n" } -First: John -Last: Doe -The Zip: 12345 -.... +First: John Last: Doe The Zip: 12345 .... ## PARAMETERS ### -Path -{{ Fill Path Description }} ```yaml Type: Object @@ -60,7 +60,6 @@ Accept wildcard characters: False ``` ### -ScriptBlock -{{ Fill ScriptBlock Description }} ```yaml Type: ScriptBlock @@ -75,7 +74,6 @@ Accept wildcard characters: False ``` ### -WorksheetName -{{ Fill WorksheetName Description }} ```yaml Type: Object @@ -90,7 +88,6 @@ Accept wildcard characters: False ``` ### -HeaderRow -{{ Fill HeaderRow Description }} ```yaml Type: Int32 @@ -105,7 +102,6 @@ Accept wildcard characters: False ``` ### -Header -{{ Fill Header Description }} ```yaml Type: String[] @@ -120,7 +116,6 @@ Accept wildcard characters: False ``` ### -NoHeader -{{ Fill NoHeader Description }} ```yaml Type: SwitchParameter @@ -135,7 +130,6 @@ Accept wildcard characters: False ``` ### -DataOnly -{{ Fill DataOnly Description }} ```yaml Type: SwitchParameter @@ -150,7 +144,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -159,3 +154,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/Public/ConvertTo-ExcelXlsx.md b/public/convertto-excelxlsx.md similarity index 78% rename from Public/ConvertTo-ExcelXlsx.md rename to public/convertto-excelxlsx.md index 99178e7..f7c1571 100644 --- a/Public/ConvertTo-ExcelXlsx.md +++ b/public/convertto-excelxlsx.md @@ -1,37 +1,35 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # ConvertTo-ExcelXlsx ## SYNOPSIS + Converts an Excel xls to a xlsx using -ComObject ## SYNTAX -``` +```text ConvertTo-ExcelXlsx [-Path] [-Force] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -Path -{{ Fill Path Description }} ```yaml Type: String @@ -46,7 +44,6 @@ Accept wildcard characters: False ``` ### -Force -{{ Fill Force Description }} ```yaml Type: SwitchParameter @@ -61,7 +58,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -70,3 +68,4 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## NOTES ## RELATED LINKS + diff --git a/Public/Get-ExcelColumnName.md b/public/get-excelcolumnname.md similarity index 71% rename from Public/Get-ExcelColumnName.md rename to public/get-excelcolumnname.md index f0d33e2..352ef39 100644 --- a/Public/Get-ExcelColumnName.md +++ b/public/get-excelcolumnname.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Get-ExcelColumnName ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Get-ExcelColumnName [[-ColumnNumber] ] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ColumnNumber -{{ Fill ColumnNumber Description }} ```yaml Type: Object @@ -46,7 +42,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -55,6 +52,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Get-HtmlTable.md b/public/get-htmltable.md similarity index 77% rename from Public/Get-HtmlTable.md rename to public/get-htmltable.md index 2945b95..d27e1e6 100644 --- a/Public/Get-HtmlTable.md +++ b/public/get-htmltable.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Get-HtmlTable ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Get-HtmlTable [-Url] [[-TableIndex] ] [[-Header] ] [[-FirstDataRow] ] [-UseDefaultCredentials] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -FirstDataRow -{{ Fill FirstDataRow Description }} ```yaml Type: Int32 @@ -47,7 +43,6 @@ Accept wildcard characters: False ``` ### -Header -{{ Fill Header Description }} ```yaml Type: Object @@ -62,7 +57,6 @@ Accept wildcard characters: False ``` ### -UseDefaultCredentials -{{ Fill UseDefaultCredentials Description }} ```yaml Type: SwitchParameter @@ -77,7 +71,6 @@ Accept wildcard characters: False ``` ### -TableIndex -{{ Fill TableIndex Description }} ```yaml Type: Object @@ -92,7 +85,6 @@ Accept wildcard characters: False ``` ### -Url -{{ Fill Url Description }} ```yaml Type: Object @@ -107,7 +99,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -116,6 +109,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Get-Range.md b/public/get-range.md similarity index 78% rename from Public/Get-Range.md rename to public/get-range.md index 553292d..94b3dbc 100644 --- a/Public/Get-Range.md +++ b/public/get-range.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Get-Range ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Get-Range [[-Start] ] [[-Stop] ] [[-Step] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -start -{{ Fill start Description }} ```yaml Type: Object @@ -46,7 +42,6 @@ Accept wildcard characters: False ``` ### -Step -{{ Fill Step Description }} ```yaml Type: Object @@ -61,7 +56,6 @@ Accept wildcard characters: False ``` ### -stop -{{ Fill stop Description }} ```yaml Type: Object @@ -82,6 +76,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Get-XYRange.md b/public/get-xyrange.md similarity index 72% rename from Public/Get-XYRange.md rename to public/get-xyrange.md index 46b7214..242e5d2 100644 --- a/Public/Get-XYRange.md +++ b/public/get-xyrange.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Get-XYRange ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Get-XYRange [[-TargetData] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -TargetData -{{ Fill TargetData Description }} ```yaml Type: Object @@ -52,6 +48,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Import-Html.md b/public/import-html.md similarity index 77% rename from Public/Import-Html.md rename to public/import-html.md index 029f341..94d5c18 100644 --- a/Public/Import-Html.md +++ b/public/import-html.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Import-Html ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Import-Html [[-Url] ] [[-Index] ] [[-Header] ] [[-FirstDataRow] ] [-UseDefaultCredentials] [] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -FirstDataRow -{{ Fill FirstDataRow Description }} ```yaml Type: Int32 @@ -47,7 +43,6 @@ Accept wildcard characters: False ``` ### -Header -{{ Fill Header Description }} ```yaml Type: Object @@ -62,7 +57,6 @@ Accept wildcard characters: False ``` ### -UseDefaultCredentials -{{ Fill UseDefaultCredentials Description }} ```yaml Type: SwitchParameter @@ -77,7 +71,6 @@ Accept wildcard characters: False ``` ### -Index -{{ Fill Index Description }} ```yaml Type: Object @@ -92,7 +85,6 @@ Accept wildcard characters: False ``` ### -Url -{{ Fill Url Description }} ```yaml Type: Object @@ -107,7 +99,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -116,6 +109,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Import-UPS.md b/public/import-ups.md similarity index 75% rename from Public/Import-UPS.md rename to public/import-ups.md index 625c903..3b14f99 100644 --- a/Public/Import-UPS.md +++ b/public/import-ups.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Import-UPS ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Import-UPS [[-TrackingNumber] ] [-UseDefaultCredentials] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -TrackingNumber -{{ Fill TrackingNumber Description }} ```yaml Type: Object @@ -46,7 +42,6 @@ Accept wildcard characters: False ``` ### -UseDefaultCredentials -{{ Fill UseDefaultCredentials Description }} ```yaml Type: SwitchParameter @@ -67,6 +62,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Import-USPS.md b/public/import-usps.md similarity index 75% rename from Public/Import-USPS.md rename to public/import-usps.md index 48833fc..e5e033e 100644 --- a/Public/Import-USPS.md +++ b/public/import-usps.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Import-USPS ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Import-USPS [[-TrackingNumber] ] [-UseDefaultCredentials] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -TrackingNumber -{{ Fill TrackingNumber Description }} ```yaml Type: Object @@ -46,7 +42,6 @@ Accept wildcard characters: False ``` ### -UseDefaultCredentials -{{ Fill UseDefaultCredentials Description }} ```yaml Type: SwitchParameter @@ -67,6 +62,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Invoke-Sum.md b/public/invoke-sum.md similarity index 78% rename from Public/Invoke-Sum.md rename to public/invoke-sum.md index cb032fa..040916d 100644 --- a/Public/Invoke-Sum.md +++ b/public/invoke-sum.md @@ -1,37 +1,33 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: https://github.com/dfinke/ImportExcel +online version: 'https://github.com/dfinke/ImportExcel' schema: 2.0.0 --- # Invoke-Sum ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Invoke-Sum [[-Data] ] [[-Dimension] ] [[-Measure] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -Data -{{ Fill Data Description }} ```yaml Type: Object @@ -46,7 +42,6 @@ Accept wildcard characters: False ``` ### -Dimension -{{ Fill Dimension Description }} ```yaml Type: Object @@ -61,7 +56,6 @@ Accept wildcard characters: False ``` ### -Measure -{{ Fill Measure Description }} ```yaml Type: Object @@ -82,6 +76,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/New-ExcelStyle.md b/public/new-excelstyle.md similarity index 87% rename from Public/New-ExcelStyle.md rename to public/new-excelstyle.md index a71b355..17272ae 100644 --- a/Public/New-ExcelStyle.md +++ b/public/new-excelstyle.md @@ -1,18 +1,17 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-ExcelStyle ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text New-ExcelStyle [[-Range] ] [[-NumberFormat] ] [[-BorderAround] ] [[-BorderColor] ] [[-BorderBottom] ] [[-BorderTop] ] [[-BorderLeft] ] [[-BorderRight] ] [[-FontColor] ] @@ -25,21 +24,18 @@ New-ExcelStyle [[-Range] ] [[-NumberFormat] ] [[-BorderAround] < ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -ArrayFormula -{{ Fill ArrayFormula Description }} ```yaml Type: SwitchParameter @@ -54,7 +50,6 @@ Accept wildcard characters: False ``` ### -AutoSize -{{ Fill AutoSize Description }} ```yaml Type: SwitchParameter @@ -69,7 +64,6 @@ Accept wildcard characters: False ``` ### -BackgroundColor -{{ Fill BackgroundColor Description }} ```yaml Type: Object @@ -84,7 +78,6 @@ Accept wildcard characters: False ``` ### -BackgroundPattern -{{ Fill BackgroundPattern Description }} ```yaml Type: ExcelFillStyle @@ -100,7 +93,6 @@ Accept wildcard characters: False ``` ### -Bold -{{ Fill Bold Description }} ```yaml Type: SwitchParameter @@ -115,7 +107,6 @@ Accept wildcard characters: False ``` ### -BorderAround -{{ Fill BorderAround Description }} ```yaml Type: ExcelBorderStyle @@ -131,7 +122,6 @@ Accept wildcard characters: False ``` ### -BorderBottom -{{ Fill BorderBottom Description }} ```yaml Type: ExcelBorderStyle @@ -147,7 +137,6 @@ Accept wildcard characters: False ``` ### -BorderColor -{{ Fill BorderColor Description }} ```yaml Type: Object @@ -162,7 +151,6 @@ Accept wildcard characters: False ``` ### -BorderLeft -{{ Fill BorderLeft Description }} ```yaml Type: ExcelBorderStyle @@ -178,7 +166,6 @@ Accept wildcard characters: False ``` ### -BorderRight -{{ Fill BorderRight Description }} ```yaml Type: ExcelBorderStyle @@ -194,7 +181,6 @@ Accept wildcard characters: False ``` ### -BorderTop -{{ Fill BorderTop Description }} ```yaml Type: ExcelBorderStyle @@ -210,7 +196,6 @@ Accept wildcard characters: False ``` ### -FontColor -{{ Fill FontColor Description }} ```yaml Type: Object @@ -225,7 +210,6 @@ Accept wildcard characters: False ``` ### -FontName -{{ Fill FontName Description }} ```yaml Type: String @@ -240,7 +224,6 @@ Accept wildcard characters: False ``` ### -FontShift -{{ Fill FontShift Description }} ```yaml Type: ExcelVerticalAlignmentFont @@ -256,7 +239,6 @@ Accept wildcard characters: False ``` ### -FontSize -{{ Fill FontSize Description }} ```yaml Type: Single @@ -271,7 +253,6 @@ Accept wildcard characters: False ``` ### -Formula -{{ Fill Formula Description }} ```yaml Type: Object @@ -286,7 +267,6 @@ Accept wildcard characters: False ``` ### -Height -{{ Fill Height Description }} ```yaml Type: Single @@ -301,7 +281,6 @@ Accept wildcard characters: False ``` ### -Hidden -{{ Fill Hidden Description }} ```yaml Type: SwitchParameter @@ -316,7 +295,6 @@ Accept wildcard characters: False ``` ### -HorizontalAlignment -{{ Fill HorizontalAlignment Description }} ```yaml Type: ExcelHorizontalAlignment @@ -332,7 +310,6 @@ Accept wildcard characters: False ``` ### -Italic -{{ Fill Italic Description }} ```yaml Type: SwitchParameter @@ -347,7 +324,6 @@ Accept wildcard characters: False ``` ### -Locked -{{ Fill Locked Description }} ```yaml Type: SwitchParameter @@ -362,7 +338,6 @@ Accept wildcard characters: False ``` ### -Merge -{{ Fill Merge Description }} ```yaml Type: SwitchParameter @@ -377,7 +352,6 @@ Accept wildcard characters: False ``` ### -NumberFormat -{{ Fill NumberFormat Description }} ```yaml Type: Object @@ -392,7 +366,6 @@ Accept wildcard characters: False ``` ### -PatternColor -{{ Fill PatternColor Description }} ```yaml Type: Object @@ -407,7 +380,6 @@ Accept wildcard characters: False ``` ### -Range -{{ Fill Range Description }} ```yaml Type: Object @@ -422,7 +394,6 @@ Accept wildcard characters: False ``` ### -ResetFont -{{ Fill ResetFont Description }} ```yaml Type: SwitchParameter @@ -437,7 +408,6 @@ Accept wildcard characters: False ``` ### -StrikeThru -{{ Fill StrikeThru Description }} ```yaml Type: SwitchParameter @@ -452,7 +422,6 @@ Accept wildcard characters: False ``` ### -TextRotation -{{ Fill TextRotation Description }} ```yaml Type: Int32 @@ -467,7 +436,6 @@ Accept wildcard characters: False ``` ### -UnderLineType -{{ Fill UnderLineType Description }} ```yaml Type: ExcelUnderLineType @@ -483,7 +451,6 @@ Accept wildcard characters: False ``` ### -Underline -{{ Fill Underline Description }} ```yaml Type: SwitchParameter @@ -498,7 +465,6 @@ Accept wildcard characters: False ``` ### -Value -{{ Fill Value Description }} ```yaml Type: Object @@ -513,7 +479,6 @@ Accept wildcard characters: False ``` ### -VerticalAlignment -{{ Fill VerticalAlignment Description }} ```yaml Type: ExcelVerticalAlignment @@ -529,7 +494,6 @@ Accept wildcard characters: False ``` ### -Width -{{ Fill Width Description }} ```yaml Type: Single @@ -544,7 +508,6 @@ Accept wildcard characters: False ``` ### -WrapText -{{ Fill WrapText Description }} ```yaml Type: SwitchParameter @@ -565,6 +528,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/New-Plot.md b/public/new-plot.md similarity index 71% rename from Public/New-Plot.md rename to public/new-plot.md index 0c233b4..0796339 100644 --- a/Public/New-Plot.md +++ b/public/new-plot.md @@ -1,33 +1,30 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-Plot ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text New-Plot ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ## INPUTS @@ -37,6 +34,8 @@ PS C:\> {{ Add example code here }} ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/New-PSItem.md b/public/new-psitem.md similarity index 71% rename from Public/New-PSItem.md rename to public/new-psitem.md index d2d8cac..88a461f 100644 --- a/Public/New-PSItem.md +++ b/public/new-psitem.md @@ -1,33 +1,30 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # New-PSItem ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text New-PSItem ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ## INPUTS @@ -37,6 +34,8 @@ PS C:\> {{ Add example code here }} ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Set-CellStyle.md b/public/set-cellstyle.md similarity index 85% rename from Public/Set-CellStyle.md rename to public/set-cellstyle.md index 843c956..e4fbb50 100644 --- a/Public/Set-CellStyle.md +++ b/public/set-cellstyle.md @@ -1,38 +1,34 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Set-CellStyle ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Set-CellStyle [[-Worksheet] ] [[-Row] ] [[-LastColumn] ] [[-Pattern] ] [[-Color] ] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -Color -{{ Fill Color Description }} ```yaml Type: Object @@ -47,7 +43,6 @@ Accept wildcard characters: False ``` ### -LastColumn -{{ Fill LastColumn Description }} ```yaml Type: Object @@ -62,7 +57,6 @@ Accept wildcard characters: False ``` ### -Pattern -{{ Fill Pattern Description }} ```yaml Type: ExcelFillStyle @@ -78,7 +72,6 @@ Accept wildcard characters: False ``` ### -Row -{{ Fill Row Description }} ```yaml Type: Object @@ -93,7 +86,6 @@ Accept wildcard characters: False ``` ### -Worksheet -{{ Fill Worksheet Description }} ```yaml Type: Object @@ -114,6 +106,8 @@ Accept wildcard characters: False ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS + diff --git a/Public/Set-WorksheetProtection.md b/public/set-worksheetprotection.md similarity index 83% rename from Public/Set-WorksheetProtection.md rename to public/set-worksheetprotection.md index 345f6f0..f8340f3 100644 --- a/Public/Set-WorksheetProtection.md +++ b/public/set-worksheetprotection.md @@ -1,18 +1,17 @@ --- external help file: ImportExcel-help.xml Module Name: ImportExcel -online version: +online version: null schema: 2.0.0 --- # Set-WorksheetProtection ## SYNOPSIS -{{ Fill in the Synopsis }} ## SYNTAX -``` +```text Set-WorksheetProtection [-Worksheet] [-IsProtected] [-AllowAll] [-BlockSelectLockedCells] [-BlockSelectUnlockedCells] [-AllowFormatCells] [-AllowFormatColumns] [-AllowFormatRows] [-AllowInsertColumns] [-AllowInsertRows] [-AllowInsertHyperlinks] [-AllowDeleteColumns] [-AllowDeleteRows] [-AllowSort] @@ -21,21 +20,18 @@ Set-WorksheetProtection [-Worksheet] [-IsProtected] [-AllowAll] ``` ## DESCRIPTION -{{ Fill in the Description }} ## EXAMPLES ### Example 1 -```powershell + +```text PS C:\> {{ Add example code here }} ``` -{{ Add example description here }} - ## PARAMETERS ### -AllowAll -{{ Fill AllowAll Description }} ```yaml Type: SwitchParameter @@ -50,7 +46,6 @@ Accept wildcard characters: False ``` ### -AllowAutoFilter -{{ Fill AllowAutoFilter Description }} ```yaml Type: SwitchParameter @@ -65,7 +60,6 @@ Accept wildcard characters: False ``` ### -AllowDeleteColumns -{{ Fill AllowDeleteColumns Description }} ```yaml Type: SwitchParameter @@ -80,7 +74,6 @@ Accept wildcard characters: False ``` ### -AllowDeleteRows -{{ Fill AllowDeleteRows Description }} ```yaml Type: SwitchParameter @@ -95,7 +88,6 @@ Accept wildcard characters: False ``` ### -AllowFormatCells -{{ Fill AllowFormatCells Description }} ```yaml Type: SwitchParameter @@ -110,7 +102,6 @@ Accept wildcard characters: False ``` ### -AllowFormatColumns -{{ Fill AllowFormatColumns Description }} ```yaml Type: SwitchParameter @@ -125,7 +116,6 @@ Accept wildcard characters: False ``` ### -AllowFormatRows -{{ Fill AllowFormatRows Description }} ```yaml Type: SwitchParameter @@ -140,7 +130,6 @@ Accept wildcard characters: False ``` ### -AllowInsertColumns -{{ Fill AllowInsertColumns Description }} ```yaml Type: SwitchParameter @@ -155,7 +144,6 @@ Accept wildcard characters: False ``` ### -AllowInsertHyperlinks -{{ Fill AllowInsertHyperlinks Description }} ```yaml Type: SwitchParameter @@ -170,7 +158,6 @@ Accept wildcard characters: False ``` ### -AllowInsertRows -{{ Fill AllowInsertRows Description }} ```yaml Type: SwitchParameter @@ -185,7 +172,6 @@ Accept wildcard characters: False ``` ### -AllowPivotTables -{{ Fill AllowPivotTables Description }} ```yaml Type: SwitchParameter @@ -200,7 +186,6 @@ Accept wildcard characters: False ``` ### -AllowSort -{{ Fill AllowSort Description }} ```yaml Type: SwitchParameter @@ -215,7 +200,6 @@ Accept wildcard characters: False ``` ### -BlockEditObject -{{ Fill BlockEditObject Description }} ```yaml Type: SwitchParameter @@ -230,7 +214,6 @@ Accept wildcard characters: False ``` ### -BlockEditScenarios -{{ Fill BlockEditScenarios Description }} ```yaml Type: SwitchParameter @@ -245,7 +228,6 @@ Accept wildcard characters: False ``` ### -BlockSelectLockedCells -{{ Fill BlockSelectLockedCells Description }} ```yaml Type: SwitchParameter @@ -260,7 +242,6 @@ Accept wildcard characters: False ``` ### -BlockSelectUnlockedCells -{{ Fill BlockSelectUnlockedCells Description }} ```yaml Type: SwitchParameter @@ -275,7 +256,6 @@ Accept wildcard characters: False ``` ### -IsProtected -{{ Fill IsProtected Description }} ```yaml Type: SwitchParameter @@ -290,7 +270,6 @@ Accept wildcard characters: False ``` ### -LockAddress -{{ Fill LockAddress Description }} ```yaml Type: String @@ -305,7 +284,6 @@ Accept wildcard characters: False ``` ### -UnLockAddress -{{ Fill UnLockAddress Description }} ```yaml Type: String @@ -320,7 +298,6 @@ Accept wildcard characters: False ``` ### -Worksheet -{{ Fill Worksheet Description }} ```yaml Type: ExcelWorksheet @@ -335,7 +312,8 @@ Accept wildcard characters: False ``` ### CommonParameters -This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). + +This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about\_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216). ## INPUTS @@ -344,6 +322,8 @@ This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable ## OUTPUTS ### System.Object + ## NOTES ## RELATED LINKS +