mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-06 00:23:20 +00:00
Added InvariantInfo to the TryParse call
This commit is contained in:
@@ -119,7 +119,7 @@ function Export-Excel {
|
||||
|
||||
$r=$null
|
||||
$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
|
||||
} else {
|
||||
$targetCell.Value = $cellValue
|
||||
@@ -164,7 +164,7 @@ function Export-Excel {
|
||||
} else {
|
||||
|
||||
$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
|
||||
} else {
|
||||
$targetCell.Value = $cellValue
|
||||
|
||||
Reference in New Issue
Block a user