From 3db1473c05f1f360fd6840d57ec3d7561e563735 Mon Sep 17 00:00:00 2001 From: dfinke Date: Fri, 12 Aug 2016 17:16:15 -0400 Subject: [PATCH] Fixed #115 --- ImportExcel.psm1 | 5 +++-- InstallModule.ps1 | 1 + README.md | 3 +++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ImportExcel.psm1 b/ImportExcel.psm1 index 50d033c..eec6fa4 100644 --- a/ImportExcel.psm1 +++ b/ImportExcel.psm1 @@ -17,6 +17,7 @@ Add-Type -Path "$($PSScriptRoot)\EPPlus.dll" . $PSScriptRoot\Import-Html.ps1 . $PSScriptRoot\Get-Range.ps1 . $PSScriptRoot\TrackingUtils.ps1 +. $PSScriptRoot\Copy-ExcelWorkSheet.ps1 if($Host.Version.Major -ge 5) { . $PSScriptRoot\plot.ps1 @@ -76,11 +77,11 @@ function Import-Excel { } else { if(!$Header) { $Header = foreach ($Column in 1..$Columns) { - $worksheet.Cells[$HeaderRow,$Column].Text + $worksheet.Cells[$HeaderRow,$Column].Value } } - if($Rows -eq 1) { + if($Rows -eq 1) { $Header | ForEach {$h=[Ordered]@{}} {$h.$_=''} {[PSCustomObject]$h} } else { foreach ($Row in ($HeaderRow+1)..$Rows) { diff --git a/InstallModule.ps1 b/InstallModule.ps1 index 7458ce0..1a3884f 100644 --- a/InstallModule.ps1 +++ b/InstallModule.ps1 @@ -8,6 +8,7 @@ $targetFiles = echo ` *.psm1 ` *.psd1 ` *.dll ` + New-ConditionalText.ps1 ` New-ConditionalFormattingIconSet.ps1 ` Export-Excel.ps1 ` Export-ExcelSheet.ps1 ` diff --git a/README.md b/README.md index 2855fa5..960afc7 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,9 @@ iex (new-object System.Net.WebClient).DownloadString('https://raw.github.com/dfi # What's new +#### 8/12/2016 +[Fixed](https://github.com/dfinke/ImportExcel/issues/115) reading the headers from cells, moved from using `Text` property to `Value` property. + #### 7/30/2016 * Added `Copy-ExcelWorksheet`. Let's you copy a work sheet from one Excel workbook to another.