Doug Finke c1cbb7ef62 Tweak
2015-04-13 10:22:25 -04:00
2015-04-10 10:18:21 -04:00
2015-04-02 13:27:28 -04:00
2015-03-27 13:32:04 -04:00
2015-04-13 10:16:01 -04:00
2015-03-27 14:07:26 -04:00
2015-04-13 09:33:49 -04:00
2015-03-27 13:32:04 -04:00
2015-04-13 10:22:25 -04:00

PowerShell Import-Excel

This PowerShell Module wraps the .NET EPPlus DLL (included). Easily integrate reading and writing Excel spreadsheets into PowerShell, without launching Excel in the background. You can also automate the creation of Pivot Tables and Charts.

Know Issues

  • Only one pivot table can be added. Investigating how EPPlus saves the target file.

What's new

4/10/2015

  • Renamed AutoFitColumns to AutoSize
  • Implemented Export-MultipleExcelSheets
  • Implemented -Password for a worksheet
  • Replaced -Force switch with -NoClobber switch
  • Added examples for Get-Help
  • If Pivot table is requested, that sheet becomes the tab selected

4/8/2015

  • Implemented exporting data to named sheets via the -WorkSheename parameter.

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

Example Export-MultipleExcelSheets

image

$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)}
}

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

Total Physical Memory Grouped By Company

image

PowerShell Excel EPPlus Video

Click on this image to watch the short video.

image

Importing data from an Excel spreadsheet

image

You can also find EPPLus on Nuget.

Description
PowerShell module to import/export Excel spreadsheets, without Excel
Readme 79 MiB
Languages
PowerShell 100%