mirror of
https://github.com/dfinke/ImportExcel.git
synced 2025-12-10 13:23:29 +00:00
Fixes Casting Error in Export-Excel #108
This commit is contained in:
@@ -135,7 +135,7 @@ function Export-Excel {
|
||||
|
||||
$r=$null
|
||||
$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.Style.Numberformat.Format=$Numberformat
|
||||
} else {
|
||||
@@ -181,7 +181,7 @@ function Export-Excel {
|
||||
} else {
|
||||
|
||||
$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.Style.Numberformat.Format=$Numberformat
|
||||
} else {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
RootModule = 'ImportExcel.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '2.2.5'
|
||||
ModuleVersion = '2.2.6'
|
||||
|
||||
# ID used to uniquely identify this module
|
||||
GUID = '60dd4136-feff-401a-ba27-a84458c57ede'
|
||||
|
||||
@@ -19,8 +19,6 @@ Install-Module ImportExcel -scope CurrentUser
|
||||
Install-Module ImportExcel
|
||||
```
|
||||
|
||||
|
||||
|
||||
####Powershell V4 and Earlier
|
||||
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
|
||||
|
||||
#### 6/28/2016
|
||||
* Fixed [Casting Error in Export-Excel](https://github.com/dfinke/ImportExcel/issues/108)
|
||||
|
||||
#### 6/01/2016
|
||||
* 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
|
||||
|
||||
Reference in New Issue
Block a user