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

Allow reading Excel files that are currently open #81

Merged
merged 1 commit into from
Jun 30, 2021
Merged

Allow reading Excel files that are currently open #81

merged 1 commit into from
Jun 30, 2021

Conversation

goswinr
Copy link
Contributor

@goswinr goswinr commented Jun 30, 2021

This allows to use the type provider while the Excel file is open in Excel 365.

@goswinr
Copy link
Contributor Author

goswinr commented Jun 30, 2021

I could not get this repro to build, So I made my own without Paket or Fake to test this change
https://github.com/goswinr/ExcelProvider2

@quintusm
Copy link
Collaborator

HI @goswinr

I am aware of the building issues, and working on it. It is unfortunately quite a big change to bring it up to date.

Thanks for the pull request. I will have a look at it and merge it. Looking at it quickly I cannot see that it is a problem at all.

@quintusm quintusm merged commit f9bcce4 into fsprojects:master Jun 30, 2021
@quintusm
Copy link
Collaborator

@goswinr

I have merged your pull request. Once again thanks for contributing!

@goswinr
Copy link
Contributor Author

goswinr commented Jun 30, 2021

Thanks, so you currently cannot publish a new nuget ?

@goswinr
Copy link
Contributor Author

goswinr commented Jun 30, 2021

I am not sure if there is now a small risk that concurrent writing and reading the file might yield a corrupt stream.
But probaly the Exception handler would catch that, no ?

@quintusm
Copy link
Collaborator

HI

I have tried to do some reading on this topic. It seems that for reading .Net tries to keep track of changes. If it detects changes it will discard the buffer and read the stream from the start again., as per the documentation. If you try to write, which we are not doing, it would throw an exception.

So I think the chances of something getting corrupted is small enough that the risk is worth taking...

@quintusm
Copy link
Collaborator

Thanks, so you currently cannot publish a new nuget ?

I will try to do a new nuget soon. Sorry for the delay.

I don't need to do all the changes I am busy with before being able to push a nuget,

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

Successfully merging this pull request may close these issues.

2 participants