- Changed the switch
-NotAsDictionary
to-Raw
. Works with-Worksheetname *
reads all the sheets in the xlsx file and returns an array.
- Fixed
Import-Excel
- ResetEndRow
andEndColumn
in the correct place.
- Importing multiple files with Import-Excel by pipeline uses only the first file for the row count dfinke#1172
- Import-Excel now supports importing multiple sheets. It can either return a dictionary of all sheets, or as a single array of all sheets combined.
Import-Excel $xlfile *
# reads all sheets, returns all data in a dictionaryImport-Excel $xlfile * -NotAsDictionary
# reads all sheets, returns all data in a single array
- Added helper functions. Useful for working with an Excel package via
Open-ExcelPackage
or-PassThru
Enable-ExcelAutoFilter
Enable-ExcelAutofit
Get-ExcelSheetDimensionAddress
-
Thank you James Mueller Updated
ConvertFrom-ExcelToSQLInsert
to handle single quotes in the SQL statement. -
Thank you to Josh Hendricks
- Add images to spreadsheets. Check it out
- Implements: dfinke#1111
- Refactored ReZip into separate function
- Deletes temp folder after rezipping
- Added -ReZip to
Close-ExcelPackage
- Thank you to Max Goczall for this contribution!
ImportColumns
parameter added toImportExcel
. It is used to define which columns of the ExcelPackage should be imported.
Import-Excel -Path $xlFile -ImportColumns @(6,7,12,25,46)
- Added query Excel spreadsheets, with SQL queries!
$query = 'select F2 as [Category], F5 as [Discount], F5*2 as [DiscountPlus] from [sheet1$A2:E11]'
Invoke-ExcelQuery .\testOleDb.xlsx $query
Category Discount DiscountPlus
-------- -------- ------------
Cosmetics 0.7 1.4
Grocery 0.3 0.6
Apparels 0.2 0.4
Electronics 0.1 0.2
Electronics 0 0
Apparels 0.8 1.6
Electronics 0.7 1.4
Cosmetics 0.6 1.2
Grocery 0.4 0.8
Grocery 0.3 0.6
- Thank you to Roy Ashbrook for the SQL query code. Catch up with Roy:
Media | Link |
---|---|
https://twitter.com/royashbrook | |
github | https://github.com/royashbrook |
https://linkedin.com/in/royashbrook | |
blog | https://ashbrook.io |
- Fix throwing error when a Worksheet name collides with a method, or property name on the
OfficeOpenXml.ExcelPackage
package
- Fix inline help, thank you Wes Stahler
- Improved checks for Linux, Mac and PS 5.1
- Improve auto-detection of data on the clipboard
- Added
Read-Clipboard
support for Windows. Read text from clipboard. It can read CSV or JSON. Plus, you can specify the delimiter and headers.