From bf899f22eb868d070b64f0376e25059509070859 Mon Sep 17 00:00:00 2001 From: Edward Miller <160973904+edwardmiller-mesirow@users.noreply.github.com> Date: Fri, 17 May 2024 16:55:03 -0500 Subject: [PATCH] Don't request Write access to the file for Import-Excel This can cause locking issues, and I don't think it is really needed for this cmdlet. --- Public/Import-Excel.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Public/Import-Excel.ps1 b/Public/Import-Excel.ps1 index 3734f2bc..18b2507c 100644 --- a/Public/Import-Excel.ps1 +++ b/Public/Import-Excel.ps1 @@ -119,7 +119,7 @@ throw "'$($Path)' file not found" } - $stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path, 'Open', 'Read', 'ReadWrite' + $stream = New-Object -TypeName System.IO.FileStream -ArgumentList $Path, 'Open', 'Read' $ExcelPackage = New-Object -TypeName OfficeOpenXml.ExcelPackage if ($Password) { $ExcelPackage.Load($stream, $Password) } else { $ExcelPackage.Load($stream) }