From 9b9c1de8fd0a7bcd21cad5906464bc1767ec4bab Mon Sep 17 00:00:00 2001 From: dfinke Date: Wed, 1 Aug 2018 10:48:45 -0400 Subject: [PATCH 1/5] remove ps1 --- InstallModule.ps1 | 1 - 1 file changed, 1 deletion(-) diff --git a/InstallModule.ps1 b/InstallModule.ps1 index 05af5a9..8d09c09 100644 --- a/InstallModule.ps1 +++ b/InstallModule.ps1 @@ -34,7 +34,6 @@ Begin { 'Export-Charts.ps1', 'Export-Excel.ps1', 'Export-ExcelSheet.ps1', - 'formatting.ps1', 'Get-ExcelColumnName.ps1', 'Get-ExcelSheetInfo.ps1', 'Get-ExcelWorkbookInfo.ps1', From 42d56ac557626c24ffb500aab33cf993c6775024 Mon Sep 17 00:00:00 2001 From: dfinke Date: Wed, 1 Aug 2018 10:48:53 -0400 Subject: [PATCH 2/5] bump version --- ImportExcel.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index 9028185..a5fad92 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -4,7 +4,7 @@ RootModule = 'ImportExcel.psm1' # Version number of this module. -ModuleVersion = '5.1.0' +ModuleVersion = '5.1.1' # ID used to uniquely identify this module GUID = '60dd4136-feff-401a-ba27-a84458c57ede' From a0719b22f0048cb514caad13abc5f1d90e6954c2 Mon Sep 17 00:00:00 2001 From: dfinke Date: Wed, 1 Aug 2018 10:49:02 -0400 Subject: [PATCH 3/5] spell check --- .vscode/spellright.dict | 1 + README.md | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.vscode/spellright.dict b/.vscode/spellright.dict index bf67eb1..ed79cff 100644 --- a/.vscode/spellright.dict +++ b/.vscode/spellright.dict @@ -26,3 +26,4 @@ EPPLus intellisense PivtoTableName New-Excelchart +paypal diff --git a/README.md b/README.md index 2574dd7..c4d4316 100644 --- a/README.md +++ b/README.md @@ -54,10 +54,10 @@ Install-Module ImportExcel # What's new to Aug 2018 - Set-Row and Set-Column will now create hyperlinks and insert dates correctly - Import-Excel now has an argument completer for Worksheet name - this can be slow on large files -- The NumberFormat parameter (in Export-Excel, Set-Row, Set-Column, Set-Format and Add-ConditionalFormat) and X&YAxisNumberFormat paramaters (in New-ExcelChartDefinition and Add-ExcelChart) now have an argument completer and the names Currency, Number, Percentage, Scientific, Fraction, Short Date ,Short time,Long time, Date-Time and Text will be converted to the correct Excel formatting strings. -- Added new function Select-Worksheet to make a named sheet active: Added -Activate switch to Add-Worksheet, to make current sheet active, Export-Excel and Add-PivotTable support -Activate and pass it to Add-Worksheet, and New-PivotTableDefinition allows it to be part of the Pivot TableDefinition. -- Fixed a bug in Set-Format which caused -Hidden not to work -- Additional tests. +- The NumberFormat parameter (in Export-Excel, Set-Row, Set-Column, Set-Format and Add-ConditionalFormat) and X&YAxisNumberFormat parameters (in New-ExcelChartDefinition and Add-ExcelChart) now have an argument completer and the names Currency, Number, Percentage, Scientific, Fraction, Short Date ,Short time,Long time, Date-Time and Text will be converted to the correct Excel formatting strings. +- Added new function Select-Worksheet to make a named sheet active: Added -Activate switch to Add-Worksheet, to make current sheet active, Export-Excel and Add-PivotTable support -Activate and pass it to Add-Worksheet, and New-PivotTableDefinition allows it to be part of the Pivot TableDefinition. +- Fixed a bug in Set-Format which caused -Hidden not to work +- Additional tests. # What's new to July 18 - Moved chart creation into its own function (Add-Excel chart) within Export-Excel.ps1. Renamed New-Excelchart to New-ExcelChartDefinition to make it clearer that it is not making anything in the workbook (but for compatibility put an alias of New-ExcelChart in so existing code does not break). Found that -Header does nothing, so it isn't Add-Excel chart and there is a message that does nothing in New-ExcelChartDefinition . From 26bf4b9a649f9d59873344a65fdbd319e592de4a Mon Sep 17 00:00:00 2001 From: dfinke Date: Wed, 1 Aug 2018 11:18:13 -0400 Subject: [PATCH 4/5] refactored the supporting file list that gets copied so it can be tested --- .vscode/spellright.dict | 1 + InstallModule.ps1 | 43 +------------------------ __tests__/ImportExcelFileList.tests.ps1 | 10 ++++++ filelist.txt | 40 +++++++++++++++++++++++ 4 files changed, 52 insertions(+), 42 deletions(-) create mode 100644 __tests__/ImportExcelFileList.tests.ps1 create mode 100644 filelist.txt diff --git a/.vscode/spellright.dict b/.vscode/spellright.dict index ed79cff..dc12c56 100644 --- a/.vscode/spellright.dict +++ b/.vscode/spellright.dict @@ -27,3 +27,4 @@ intellisense PivtoTableName New-Excelchart paypal +dll diff --git a/InstallModule.ps1 b/InstallModule.ps1 index 8d09c09..80e287c 100644 --- a/InstallModule.ps1 +++ b/InstallModule.ps1 @@ -18,48 +18,7 @@ Begin { Try { Write-Verbose "$ModuleName module installation started" - $Files = @( - '*.dll', - '*.psd1', - '*.psm1', - 'AddConditionalFormatting.ps1', - 'Charting.ps1', - 'ColorCompletion.ps1', - 'Compare-Worksheet.ps1', - 'ConvertFromExcelData.ps1', - 'ConvertFromExcelToSQLInsert.ps1', - 'ConvertExcelToImageFile.ps1', - 'ConvertToExcelXlsx.ps1', - 'Copy-ExcelWorkSheet.ps1', - 'Export-Charts.ps1', - 'Export-Excel.ps1', - 'Export-ExcelSheet.ps1', - 'Get-ExcelColumnName.ps1', - 'Get-ExcelSheetInfo.ps1', - 'Get-ExcelWorkbookInfo.ps1', - 'Get-HtmlTable.ps1', - 'Get-Range.ps1', - 'Get-XYRange.ps1', - 'Import-Html.ps1', - 'InferData.ps1', - 'Invoke-Sum.ps1', - 'Join-Worksheet.ps1', - 'Merge-Worksheet.ps1', - 'New-ConditionalFormattingIconSet.ps1', - 'New-ConditionalText.ps1', - 'New-ExcelChart.ps1', - 'New-PSItem.ps1', - 'Open-ExcelPackage.ps1', - 'Pivot.ps1', - 'Plot.ps1', - 'Send-SQLDataToExcel.ps1', - 'Set-CellStyle.ps1', - 'Set-Column.ps1', - 'Set-Row.ps1', - 'SetFormat.ps1', - 'TrackingUtils.ps1', - 'Update-FirstObjectProperties.ps1' - ) + $Files = Get-Content $PSScriptRoot\filelist.txt } Catch { throw "Failed installing the module '$ModuleName': $_" diff --git a/__tests__/ImportExcelFileList.tests.ps1 b/__tests__/ImportExcelFileList.tests.ps1 new file mode 100644 index 0000000..89c50ba --- /dev/null +++ b/__tests__/ImportExcelFileList.tests.ps1 @@ -0,0 +1,10 @@ +Describe "ImportExcel File List" { + It "All files should exist" { + $fileList = Get-Content "$PSScriptRoot\..\filelist.txt" + + foreach ($file in $fileList) { + $targetFile = "$PSScriptRoot\..\$file" + Test-Path $targetFile | Should Be $true + } + } +} \ No newline at end of file diff --git a/filelist.txt b/filelist.txt new file mode 100644 index 0000000..f14b866 --- /dev/null +++ b/filelist.txt @@ -0,0 +1,40 @@ +*.dll +*.psd1 +*.psm1 +AddConditionalFormatting.ps1 +Charting.ps1 +ColorCompletion.ps1 +Compare-Worksheet.ps1 +ConvertFromExcelData.ps1 +ConvertFromExcelToSQLInsert.ps1 +ConvertExcelToImageFile.ps1 +ConvertToExcelXlsx.ps1 +Copy-ExcelWorkSheet.ps1 +Export-Charts.ps1 +Export-Excel.ps1 +Export-ExcelSheet.ps1 +Get-ExcelColumnName.ps1 +Get-ExcelSheetInfo.ps1 +Get-ExcelWorkbookInfo.ps1 +Get-HtmlTable.ps1 +Get-Range.ps1 +Get-XYRange.ps1 +Import-Html.ps1 +InferData.ps1 +Invoke-Sum.ps1 +Join-Worksheet.ps1 +Merge-Worksheet.ps1 +New-ConditionalFormattingIconSet.ps1 +New-ConditionalText.ps1 +New-ExcelChart.ps1 +New-PSItem.ps1 +Open-ExcelPackage.ps1 +Pivot.ps1 +Plot.ps1 +Send-SQLDataToExcel.ps1 +Set-CellStyle.ps1 +Set-Column.ps1 +Set-Row.ps1 +SetFormat.ps1 +TrackingUtils.ps1 +Update-FirstObjectProperties.ps1 \ No newline at end of file From d9fe0a31c3d1703a7582d51aae42c92122733a09 Mon Sep 17 00:00:00 2001 From: dfinke Date: Wed, 1 Aug 2018 11:22:30 -0400 Subject: [PATCH 5/5] sorted file list --- filelist.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filelist.txt b/filelist.txt index f14b866..f4277d6 100644 --- a/filelist.txt +++ b/filelist.txt @@ -5,9 +5,9 @@ AddConditionalFormatting.ps1 Charting.ps1 ColorCompletion.ps1 Compare-Worksheet.ps1 +ConvertExcelToImageFile.ps1 ConvertFromExcelData.ps1 ConvertFromExcelToSQLInsert.ps1 -ConvertExcelToImageFile.ps1 ConvertToExcelXlsx.ps1 Copy-ExcelWorkSheet.ps1 Export-Charts.ps1