mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-11 05:43:17 +00:00
renamed to NotAsDictionary
This commit is contained in:
@@ -37,7 +37,7 @@
|
|||||||
[ValidateNotNullOrEmpty()]
|
[ValidateNotNullOrEmpty()]
|
||||||
[String]$Password,
|
[String]$Password,
|
||||||
[Int[]]$ImportColumns,
|
[Int[]]$ImportColumns,
|
||||||
[Switch]$NoHashtable
|
[Switch]$NotAsDictionary
|
||||||
)
|
)
|
||||||
end {
|
end {
|
||||||
$sw = [System.Diagnostics.Stopwatch]::StartNew()
|
$sw = [System.Diagnostics.Stopwatch]::StartNew()
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
finally {
|
finally {
|
||||||
if ($Path) { $stream.close(); $ExcelPackage.Dispose() }
|
if ($Path) { $stream.close(); $ExcelPackage.Dispose() }
|
||||||
|
|
||||||
if ($NoHashtable) {
|
if ($NotAsDictionary) {
|
||||||
foreach ($entry in $xlbook.GetEnumerator()) {
|
foreach ($entry in $xlbook.GetEnumerator()) {
|
||||||
$entry.Value
|
$entry.Value
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ Describe 'Different ways to import sheets' -Tag ImportExcelReadSheets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
It 'Should return an array not a dictionary' {
|
It 'Should return an array not a dictionary' {
|
||||||
$actual = Import-Excel $xlFilename april, june -NoHashtable
|
$actual = Import-Excel $xlFilename april, june -NotAsDictionary
|
||||||
|
|
||||||
$actual.Count | Should -Be 200
|
$actual.Count | Should -Be 200
|
||||||
$group = $actual | Group-Object month -NoElement
|
$group = $actual | Group-Object month -NoElement
|
||||||
|
|||||||
Reference in New Issue
Block a user