-
Notifications
You must be signed in to change notification settings - Fork 544
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
Excel file: Specified part does not exist in the package. #247
Comments
@AlirezaAhmadiRad : I used following code to open your file and it worked fine.I tested this on Windows OS. OpenSettings openSettings = new OpenSettings(); Thanks |
Thanks
I also checked with MarkupCompatibilityProcessMode.ProcessLoadedPartsOnly but the same problem persisted. |
@AlirezaAhmadiRad : Can you replace that 'stream2' with absolute path of the file to verify if that is causing this issue? Also, are you running this on Windows OS or MAC ? |
Hello Thnaks |
You have not assigned anything to memorystream which is most likely the reason for this error. Refer following working code. Use 'ms.Write(ba, 0, ba.Length)' before opening the SpreadsheetDocument; to resolve the issue.
|
Thanks, you directed me to correct route. byte array is corrupted somewhere in the middle. |
Hello
I have an Excel file directly created by Microsoft Excel. When I try to open it with SpreadsheetDocument.Open(), I get exception of Specified part does not exist in the package.
I'm using NuGet 2.7.2
Exception details:
Source: WindowsBase
Target site: System.IO.Packaging.Package.GetPart(System.Uri)
Could you please help?
DB84080A-8AB9-49AB-A607-0367D6A7F73ABook1.xlsx
The text was updated successfully, but these errors were encountered: