-
Notifications
You must be signed in to change notification settings - Fork 399
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
intermittent Save" with "0" argument(s) when importing multiple csvs #1629
Comments
thanks @twhitesc Can you show more of the script? what is in Not sure what the issue might be. |
Yes $General_Daily points to a csv file. It worked fine for years. And then in 2024 at some point it started popping up. Happens in background and in foreground. The csv files are no more than 3 KB in size. The excel file doesn't yet exist until this script creates it so it wouldn't be opened by another process/user.
#Totals `try import-csv $General_Daily | Export-Excel $xlfile -WorkSheetName "Metrics" -AutoSize -StartRow 10 -StartColumn 13 -TableName General_Daily -TableStyle Light15 -Title "Combined Program totals - Daily" -TitleBold -TitleSize 14 Close-ExcelPackage $excel |
did you update the ImportExcel module? not sure why the $excel = import-csv $Callback_Disposition_Total | Export-Excel $xlfile -WorkSheetName "Callback Disposition" -AutoSize -StartRow 39 -StartColumn 1 -TableName Callback_Disposition_Total -TableStyle Light15 -NoHeader -PassThru then this is not needed: Close-ExcelPackage $excel Doesn't look like issues to my eye. Btw, very cool application of the Excel module. Maybe the module got updated and it introduced an issue. |
i didn't update the package until we saw the issue. we've updated it a few times since the issue started. i believe we do -PassThru as there is a bunch of other excel formatting we do before finally calling Close-ExcelPackage $excel The error occurs before we get to the final -PassThru line. |
I'd need a small repro of this to see what may be the issue, including data. If it makes sense, I'd look to go back to a version of ImportExcel that worked. |
I figured out the issue. Bitdefender was locking the file. Disabling it solved the issue. Thanks for your help. |
Wow - thanks for updating |
fantastic overall module.
intermittently we are getting "Save with "0" argument(s)" error as it seems the excel file is locked when it tries to update it with additional csv files. we have roughly 20 csvs that must be imported. fails at different places. 1 out of 10 times it fails.
using a start-sleep in between imports reduced the issue but didn't eliminate it. Any suggestions?
example:
Thank you
The text was updated successfully, but these errors were encountered: