ahmedwalid05 / FastExcel

Fast Excel Reading and Writing in .Net
MIT License
335 stars 98 forks source link

Allow usage of Streams as input template and output excelfile #54

Closed TorstenL closed 4 years ago

TorstenL commented 4 years ago

We would open FastExcel to more usecases if we support streams as in and output targets.

As an example: The template file could be a embedded resource stream, the output a http stream response.

mrjono1 commented 4 years ago

Thankyou for the PR, ill have a look I'm also open to new maintainers as I no longer have a need for this package

mrjono1 commented 4 years ago

Has just been published to nuget :)

TorstenL commented 4 years ago

Oh great thank you!

tsarbin commented 4 years ago

This nuget release breaks code that reads in the filename from ExcelFile.FullName.

mrjono1 commented 4 years ago

I better see if i can roll it back

On Fri, 10 Jul. 2020, 6:05 pm Tim Sarbin, notifications@github.com wrote:

This nuget release breaks code that reads in the filename from ExcelFile.FullName.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/mrjono1/FastExcel/pull/54#issuecomment-656544855, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHVADSGSZI52QAHGO7AJHLR23DV3ANCNFSM4OSOPHDA .

TorstenL commented 4 years ago

Hey Guys :)

Reading and Writing is working fine for me in every combination - even for big files. Could you please provide at bit more informations ?

tsarbin commented 4 years ago

We have a middleware layer that converts incoming data into a FastExcel document. Part of this process includes loading the document from a file and creating a FastExcel Document object and passing that into the controller. Previously we were able to determine the file name in the controller action, but this PR removes any references to the original file information. This is a breaking change with no migration path. We've rolled back to the last version, but just wanted a heads up that if anyone else is accessing the file name, their builds are going to break with no simple solution when they upgrade their nuget packages.

tsarbin commented 4 years ago

One suggestion would be to add a new modification that assigns FileInfo if it's created with that parameter as it does today, and have it publicly accessible as a getter only. That way the stream logic can stay in place, but the original file information is still accessible if available. It also may be a good idea to throw an explicit exception on the getter if the file info is not present.

TorstenL commented 4 years ago

Good Point. I apologize for the inconveniences. I implemented that on my Branch for the sake of completeness – so if anyone still interested in the Feature I could create a new pull request. We have however switch away from FastExcel, cause we realized that FastExcel doesn’t quiet fit our requirements for our usecase with a enormous amount of rows.

mrjono1 commented 4 years ago

To quickly get it working for others again I have re released v 3.0.6 as 3.0.11. I currently don't have a use case for this project so happy for some other maintainers or someone to take it over.