mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-15 07:43:23 +00:00
Added InvariantInfo to the TryParse call
This commit is contained in:
@@ -119,7 +119,7 @@ function Export-Excel {
|
|||||||
|
|
||||||
$r=$null
|
$r=$null
|
||||||
$cellValue=$TargetData
|
$cellValue=$TargetData
|
||||||
if([double]::tryparse($cellValue, [ref]$r)) {
|
if([Double]::TryParse($cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
||||||
$targetCell.Value = $r
|
$targetCell.Value = $r
|
||||||
} else {
|
} else {
|
||||||
$targetCell.Value = $cellValue
|
$targetCell.Value = $cellValue
|
||||||
@@ -164,7 +164,7 @@ function Export-Excel {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
$r=$null
|
$r=$null
|
||||||
if([double]::tryparse($cellValue, [ref]$r)) {
|
if([Double]::TryParse($cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
||||||
$targetCell.Value = $r
|
$targetCell.Value = $r
|
||||||
} else {
|
} else {
|
||||||
$targetCell.Value = $cellValue
|
$targetCell.Value = $cellValue
|
||||||
|
|||||||
Reference in New Issue
Block a user