Skip to content
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

CancellationToken in DocumentFormat.OpemXml.Packaging.SpreadsheetDocument.Open function #1490

Open
AlfredHellstern opened this issue Jul 11, 2023 Discussed in #1489 · 1 comment
Assignees

Comments

@AlfredHellstern
Copy link
Collaborator

Discussed in #1489

Originally posted by ahsanaman92 July 7, 2023
Version: DocumentFormat.OpenXml v2.20.0

I am working on an issue where the customer has reported that it takes a while for the DocumentFormat.OpemXml.Packaging.SpreadsheetDocument.Open function to determine a large Excel document (329 MB) is invalid over the network. Is there a plan to be able to pass a CancellationToken to the open function?

The function is passed a System.IO.Stream input like this: using (SpreadsheetDocument Doc = SpreadsheetDocument.Open(input, false))

@twsouthwick
Copy link
Member

twsouthwick commented Jul 11, 2023

@ahsanaman92 the challenge here is that we don't currently do anything async (the layers below us don't provide the APIs so it's not for lack of us wanting to) and the normal file open sync methods don't support that (i.e. no CancellationToken while opening a file). If we can get a way to hook that in, we could expose a method to do that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants