mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-23 03:33:30 +00:00
Fixes Casting Error in Export-Excel #108
This commit is contained in:
@@ -135,7 +135,7 @@ function Export-Excel {
|
|||||||
|
|
||||||
$r=$null
|
$r=$null
|
||||||
$cellValue=$TargetData
|
$cellValue=$TargetData
|
||||||
if([Double]::TryParse($cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
if([Double]::TryParse([string]$cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
||||||
$targetCell.Value = $r
|
$targetCell.Value = $r
|
||||||
$targetCell.Style.Numberformat.Format=$Numberformat
|
$targetCell.Style.Numberformat.Format=$Numberformat
|
||||||
} else {
|
} else {
|
||||||
@@ -181,7 +181,7 @@ function Export-Excel {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
$r=$null
|
$r=$null
|
||||||
if([Double]::TryParse($cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
if([Double]::TryParse([string]$cellValue,[System.Globalization.NumberStyles]::Any,[System.Globalization.NumberFormatInfo]::InvariantInfo, [ref]$r)) {
|
||||||
$targetCell.Value = $r
|
$targetCell.Value = $r
|
||||||
$targetCell.Style.Numberformat.Format=$Numberformat
|
$targetCell.Style.Numberformat.Format=$Numberformat
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
RootModule = 'ImportExcel.psm1'
|
RootModule = 'ImportExcel.psm1'
|
||||||
|
|
||||||
# Version number of this module.
|
# Version number of this module.
|
||||||
ModuleVersion = '2.2.5'
|
ModuleVersion = '2.2.6'
|
||||||
|
|
||||||
# ID used to uniquely identify this module
|
# ID used to uniquely identify this module
|
||||||
GUID = '60dd4136-feff-401a-ba27-a84458c57ede'
|
GUID = '60dd4136-feff-401a-ba27-a84458c57ede'
|
||||||
|
|||||||
@@ -19,8 +19,6 @@ Install-Module ImportExcel -scope CurrentUser
|
|||||||
Install-Module ImportExcel
|
Install-Module ImportExcel
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
####Powershell V4 and Earlier
|
####Powershell V4 and Earlier
|
||||||
To install to your personal modules folder (e.g. ~\Documents\WindowsPowerShell\Modules), run:
|
To install to your personal modules folder (e.g. ~\Documents\WindowsPowerShell\Modules), run:
|
||||||
|
|
||||||
@@ -30,6 +28,9 @@ iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/dfi
|
|||||||
|
|
||||||
# What's new
|
# What's new
|
||||||
|
|
||||||
|
#### 6/28/2016
|
||||||
|
* Fixed [Casting Error in Export-Excel](https://github.com/dfinke/ImportExcel/issues/108)
|
||||||
|
|
||||||
#### 6/01/2016
|
#### 6/01/2016
|
||||||
* Added -UseDefaultCredentials to both `Import-Html` and `Get-HtmlTable`
|
* Added -UseDefaultCredentials to both `Import-Html` and `Get-HtmlTable`
|
||||||
* New functions, `Import-UPS` and `Import-USPS`. Pass in a valid tracking # and it scrapes the page for the delivery details
|
* New functions, `Import-UPS` and `Import-USPS`. Pass in a valid tracking # and it scrapes the page for the delivery details
|
||||||
|
|||||||
Reference in New Issue
Block a user