New version of this module will be developed under PSWriteOffice project. This module will no longer be developed! It has been replaced by PSWriteOffice project which will be a combination of Word, Excel and in future PowerPoint features. No new features, fixes will be added, but it will continue to work.
PSWriteExcel is very basic (at the moment) PowerShell module to create Microsoft Excel workbooks without Microsoft Excel installed. Its main purpose is to support/create Excel for PSWinDocumentation project. Depending on requirements of this project (and maybe few others) it may evolve or cover more feature sets. After some basic testing, it seems to work fine on Windows and Linux and MacOS.
More information can be found on a dedicated page for PSWriteExcel module.
- Long way -
New-ExcelDocument
,Add-ExcelWorkSheet
,Add-ExcelWorksheetData
and finallySave-ExcelDocument
- Short way -
$Object | ConvertTo-Excel -Path 'Export.xlsx' -WorkSheetName 'MyName'
There are couple of more commands in play that may come useful. Feel free to explore.
-
0.1.14 - 2022.15.16
- Fixes bad release
-
0.1.13 - 2022.15.16
- Fixes an issue when column names are duplicates #5
-
0.1.12 - 2020.11.21
- Added back missing cmdlet which would prevent
Excel
cmdlet from working
- Added back missing cmdlet which would prevent
-
0.1.11 - 2020.09.24
Set-ExcelWorkSheetCellStyle
is now usable, it wasn't even half working before.
-
0.1.10 - 2020.07.31
- Fix misspelling of "suppress" as "supress" (finally!) - tnx natescherer #7
-
0.1.9 - 2020.07.30
- Added verification for cell lenght to prevent errors. Cell will be trimmed to 32767 chars when lenght exceeds that.
-
0.1.8 - 2020.06.21
- Small improvement
-
0.1.7 - 2020.06.21
- Fix for not displaying $False and few other values
-
0.1.6 - 2020.06.10
- Fix for colors, Colors should limit output while typing
- Added
Request-ExcelWorkSheetCalculation
- Added ability to add CellFormula to
Add-ExcelWorkSheetCell
- Fix for
Transpose
inConvertTo-Excel
-
0.1.5 - 2020.01.17
- Merged
Excelimo
back intoPSWriteExcel
- Merged all dependencies into
PSWriteExcel
- requires additional modules only for development like all my other modules
- Merged
-
0.1.2 - 23.06.2019
- Support for PSSharedGoods 0.0.79
- Some speed improvements
-
0.1.0 - 17.04.2019
- Big Performance improvements, removed some redundant calls
- Updated .DLL to the newest version (compiled from Source Code on day 15.04.2019 with all changes/fixes in EPPlus)
-
0.0.17 - 22.03.2019
- Added -PreScanHeaders to ConvertTo-Excel - objects are prescanned first so that property names are known before exporting
-
0.0.16 - 15.02.2019
- Added -TableStyle ConvertTo-Excel
- Added -TableStyle Add-ExcelWorksheetData
# Download the Microsoft repository GPG keys
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
# Register the Microsoft repository GPG keys
sudo dpkg -i packages-microsoft-prod.deb
# Update the list of products
sudo apt-get update
# Install PowerShell
sudo apt-get install -y powershell
# Start PowerShell
pwsh
For anything else refer to the great Microsoft Article - Installing PowerShell Core on Linux
Install-Module PSWriteExcel -Scope CurrentUser
#Update-Module PSWriteExcel
Get-Process | ConvertTo-Excel -Path 'ThisIsMyExcel.xlsx' -WorkSheetName 'AndWorksheet' -AutoFilter
This module is based on EPPlus and it's doing all the magic behind this project. PSWriteExcel is merely a wrapper around that with few PowerShell tricks around converting objects into tables.