mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Added Get-ExcelFileSummary
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
RootModule = 'ImportExcel.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '7.1.1'
|
||||
ModuleVersion = '7.1.2'
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '60dd4136-feff-401a-ba27-a84458c57ede'
|
||||
@@ -52,6 +52,7 @@ Check out the How To Videos https://www.youtube.com/watch?v=U3Ne_yX4tYo&list=PL5
|
||||
'Export-Excel',
|
||||
'Export-ExcelSheet',
|
||||
'Get-ExcelColumnName',
|
||||
'Get-ExcelFileSummary',
|
||||
'Get-ExcelSheetInfo',
|
||||
'Get-ExcelWorkbookInfo',
|
||||
'Get-HtmlTable',
|
||||
|
||||
28
Public/Get-ExcelFileSummary.ps1
Normal file
28
Public/Get-ExcelFileSummary.ps1
Normal file
@@ -0,0 +1,28 @@
|
||||
function Get-ExcelFileSummary {
|
||||
<#
|
||||
.Synopsis
|
||||
Gets summary information on an Excel file like number of rows, columns, and more
|
||||
#>
|
||||
param(
|
||||
[Parameter(ValueFromPipelineByPropertyName, Mandatory)]
|
||||
[Alias('FullName')]
|
||||
$Path
|
||||
)
|
||||
|
||||
Process {
|
||||
$excel = Open-ExcelPackage -Path $Path
|
||||
|
||||
foreach ($workSheet in $excel.Workbook.Worksheets) {
|
||||
[PSCustomObject][Ordered]@{
|
||||
ExcelFile = Split-Path -Leaf $Path
|
||||
WorksheetName = $workSheet.Name
|
||||
Rows = $workSheet.Dimension.Rows
|
||||
Columns = $workSheet.Dimension.Columns
|
||||
Address = $workSheet.Dimension.Address
|
||||
Path = Split-Path $Path
|
||||
}
|
||||
}
|
||||
|
||||
Close-ExcelPackage -ExcelPackage $excel -NoSave
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,9 @@ Fixes, Updates and new Examples
|
||||
| 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.1.2
|
||||
|
||||
- Added `Get-ExcelFileSummary`. Gets summary information on an Excel file like number of rows, columns, and more.
|
||||
## What's new 7.0.1
|
||||
|
||||
More infrastructure improvements.
|
||||
|
||||
Reference in New Issue
Block a user