From efa73b37a0f1e3737ca4e64bb5bd5654649c81d4 Mon Sep 17 00:00:00 2001 From: Phil Bossman Date: Tue, 30 Apr 2024 11:59:08 -0400 Subject: [PATCH 1/3] Resolve worksheet argumentcompleter Fixes:#1590 --- Private/ArgumentCompletion.ps1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Private/ArgumentCompletion.ps1 b/Private/ArgumentCompletion.ps1 index f7ced450..ceaefe87 100644 --- a/Private/ArgumentCompletion.ps1 +++ b/Private/ArgumentCompletion.ps1 @@ -67,9 +67,8 @@ function WorksheetArgumentCompleter { param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter) $xlPath = $fakeBoundParameter['Path'] if (Test-Path -Path $xlPath) { - $xlpkg = Open-ExcelPackage -ReadOnly -Path $xlPath - $WorksheetNames = $xlPkg.Workbook.Worksheets.Name - Close-ExcelPackage -nosave -ExcelPackage $xlpkg + $xlSheet = Get-ExcelSheetInfo -Path $xlPath + $WorksheetNames = $xlSheet.Name $WorksheetNames.where( { $_ -like "*$wordToComplete*" }) | foreach-object { New-Object -TypeName System.Management.Automation.CompletionResult -ArgumentList "'$_'", $_ , ([System.Management.Automation.CompletionResultType]::ParameterValue) , $_ From 98e2ac96ea6d020944cf1b66a2c0f976404bd6de Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Fri, 3 May 2024 13:46:02 -0400 Subject: [PATCH 2/3] update changelog and add image --- changelog.md | 8 ++++++++ images/AutoCompleteSheetNames.png | Bin 0 -> 11555 bytes 2 files changed, 8 insertions(+) create mode 100644 images/AutoCompleteSheetNames.png diff --git a/changelog.md b/changelog.md index 07edfd1e..59428991 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,11 @@ +# 7.8.7 + +- Thanks to [Phil Bossman](https://github.com/pbossman) for the PR and fixing this. + + Now, back again, you can type `Import-Excel .\yearlySales.xlsx`, press and get a list of the worksheets in the Excel file + + ![alt text](images/AutoCompleteSheetNames.png) + # Infrastructure change - Thank you to [RipFence](https://github.com/RipFence) who asked how to place a chart on a different sheet from the data and then did a PR adding the example. diff --git a/images/AutoCompleteSheetNames.png b/images/AutoCompleteSheetNames.png new file mode 100644 index 0000000000000000000000000000000000000000..59b4cbd49e782c9bf71353ee78f35cfc97158266 GIT binary patch literal 11555 zcmai)XIPWXw)bg*3W`W?0Yw1?1f(M*Hb6v;sPqmZXy`?H5D)<=p$JGXQBhjx2oeI) zYv_ScrFTduAqgaJ+)H2=VZ!`e0z&Hk zGw38B2!nun*OT{=1mt#r)X&Uq&-IZX&kst}4W)DH@PmwHM++C&+|W;t#hNpp_N0fDgW;IkCv;<^~R3YpPE(+&YURb{pN(&14Irw2+KpJ>@kVwTj~$tQo{PkF@<} z5zz=b#&v)}R3bVDdRUp`ZLPKzGSR%e6#AIl)3a9ZK3#9wa+{acLb}-IOUJD^^N%4n zcqlj2z8Q&=UGwkz0;Wb zbg*MwHkjB`>zTUh5M%FgG3-=B@bQ8O2*v;TkHO%xD@_^Rg}BshG8}Y-BqX+oU5&0C z>evY;{Q_^Eh)}{%!3MXEJE*%IMWo{*DhYw8Usm#d?*wgaRwAPD>glN7Zjc_>eAkXG zeW_eKc;m=Z1(Ctj<3h+Q{!;JY_qHKOp)RY^ zuah!?F}KVd9UNoacTsPTV?3rFQhv54l%gAFCv54bGcup6{-k1@t}(?&zkPhZyi$9` zmzOnbF&Ld|Jg<(I zV*CMJPKh@KW`}8B=eMs9KTe-XtuQp1hv^gtaw>dZxy=o)EoaaPo00;Zk6fDUZUHpMDX~#3grK+!YVp^mO?@$ zI~0-OUmx72a-GAe4+))^9y=uu+uH1NOAx&SkmIxUff^Ru*Lfbqc)z@}VAEm5c_Zkz zEPDI~H}Ao$=1#?_N-O(kyi;O&TEV)rDYnf8eISYvbu$Vf zh5J+VD457g#Sv)Oe|%EUsdyyks(2mPi{Zuj9J}8a48lYJjwxLc zr}kqT<5mTd+4i?4Tr(?`p#7UF-Sy(ZU$O>49`{7NH%#}n8Y?l4clrZuo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13_u zIMaMFsW$*PjC60PKz1clS{g08QSk*IL30v07ITFkMM&hdO&qquP+8~OYKB4Sr!vN7(!{DjH#=QOitUADy`H4IDV3-)&I~*aKtP=8NasjvJ>^P zQif!MSU(LdUQ*BG&(v3oh$N+T5o&1nL9RndKogjj4bp1dSNfn`&PV);**-|g;i-nY zz(p9+SiUrW^+sA@O3)|ukg4kJzqP5AHZ*P8A?ZXK5BO$0cMV+JkKTWOAl>ew2J<<6 zVNse3KU`9SX+WCh?5RUCtNZ_sQLv){(c}VQ^y8`6jg9p2L=73Fvbw@|v%|?S(yID$ zb-}67pDPEi?Vuvcra9#Ow_c#vL~Q9_%;I7D49;GHn3x@UDW3{2V|JCEC#J`hVyn6oyg@5h2$Y>$0DEH8M>bcfb zz?y`{e|0#tp&9#^NB^(x_dhd!`b&Nx`V8=*ouE;ljgo`0{{zD&&HwMPh3xC|GkTyu ium8EuGImBPJHs|_?+Be@1FiU(PFL&6{nESEq5luLp!@&; literal 0 HcmV?d00001 From 53712d4f7f034c160656f3dd4f0b29ce30290c33 Mon Sep 17 00:00:00 2001 From: Doug Finke Date: Fri, 3 May 2024 13:46:19 -0400 Subject: [PATCH 3/3] bump version --- ImportExcel.psd1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ImportExcel.psd1 b/ImportExcel.psd1 index 79a863f5..f22d801c 100644 --- a/ImportExcel.psd1 +++ b/ImportExcel.psd1 @@ -6,7 +6,7 @@ RootModule = 'ImportExcel.psm1' # Version number of this module. - ModuleVersion = '7.8.6' + ModuleVersion = '7.8.7' # ID used to uniquely identify this module GUID = '60dd4136-feff-401a-ba27-a84458c57ede'