-
Notifications
You must be signed in to change notification settings - Fork 38
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
Load memoryStream using CopyAsync #58
base: dev-pr
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
A small change about the exception handling is necessary to ensure that only one type of exception is exposed to the higher level of the library.
Also: May this modification also be necessary für the writer function? I assume the main change is this here:
await Task.Run(() =>
{
ReadZip(zf);
}).ConfigureAwait(false);
@@ -70,32 +70,81 @@ public XlsxReader(Stream stream, ImportOptions options = null) | |||
/// </exception> | |||
public void Read() | |||
{ | |||
try |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The try block as wrapper is still necessary since FileStream could fail with several other Exceptions than a common IOException (An own version is used anyway --> Exceptions.IOException). The only Exception that is used as interface is this mentioned IOException.
See also: .NET documentation about possible exception for FileStream
The feature to load workbooks as stream or file asynchronously was implemented in Release v2.4.0. |
Make it work with Blazor WAsm