-
Notifications
You must be signed in to change notification settings - Fork 65
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error saving file (on Ubuntu) #69
Comments
For others hitting this issue, a few solutions to this error message (note: this is not an exhaustive list): Empty FileIf you create a new excel file with no conent, you won't be able to save it:
The fix here: ensure you output some content to your file. If you just needed a blank file you wouldn't be using this cmdlet, so presumably this is done in error; check your code to ensure the data you expect to be output, is. Existing Non-Excel FileIf you create an excel file using a filename which already exists but is not an Excel file, then you open the non-excel file by using
In this case you can get around the issue in a couple of ways. Either delete the file created by
|
Hi there,
I successfully used this great module on WS2012R2 and I tried to do the same on an Azure VM running Ubuntu where I installed PowerShell version 6.1
PSExcel was successfully installed with the Install-Module command and all module methods used so far were working as expected... until I tried to save the current $Excel object as shown below:
$Excel | Close-Excel -Save
Close-Excel : Error saving file. Will not close this ExcelPackage: Exception calling "Save" with "0" argument(s): "Error saving file /myfolder/TemplateTest.xlsx"
At line:1 char:11
Maybe there is something in the way relative/absolute paths are handled that should be adapted to run against the Linux file system?
Please let me know whether additional details are required to help fixing this issue..
Thanks!
Roberto
The text was updated successfully, but these errors were encountered: