mirror of
https://github.com/dfinke/ImportExcel.git
synced 2026-01-03 17:13:17 +00:00
Use value instead of Text when reading cells to preserve types.
This commit is contained in:
committed by
dfinke
parent
84e273387c
commit
5f5ba10021
@@ -36,7 +36,7 @@ function Import-Excel {
|
|||||||
foreach ($Column in 0..($Columns-1)) {
|
foreach ($Column in 0..($Columns-1)) {
|
||||||
if($Header[$Column].Length -gt 0) {
|
if($Header[$Column].Length -gt 0) {
|
||||||
$Name = $Header[$Column]
|
$Name = $Header[$Column]
|
||||||
$h.$Name = $worksheet.Cells[$Row,($Column+1)].Text
|
$h.$Name = $worksheet.Cells[$Row,($Column+1)].Value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[PSCustomObject]$h
|
[PSCustomObject]$h
|
||||||
|
|||||||
Reference in New Issue
Block a user