-
-
Notifications
You must be signed in to change notification settings - Fork 347
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
Generalize excel writing with a common write adapter and implement writing IAsyncEnumerable #712
Generalize excel writing with a common write adapter and implement writing IAsyncEnumerable #712
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@Discolai I change some of the code, so that there are no more break change
@shps951023 Can we mark |
I realized the same as you did for |
Ha ~, |
Yes I agree that we can remove/deprecate |
Couldn't agree more, current work loading is hard between async and non-async. |
@izanhzh Some people would like to use higher source to get better performance, for me, I only use ZipArchiveMode.Create by miniexcel. we can develop miniexcel new functions only for ZipArchiveMode.Create. Becuase ZipArchiveMode.Update is not the core of miniexcel :) . |
I have done some work previously with the writing logic in MiniExcel and I always found it cumbersome to duplicate it across different datasource implementations .
This PR adds two new interfaces
IMiniExcelWriteAdapter
andIAsyncMiniExcelWriteAdapter
to generalize data fetching for writing to excel or csv. Which makes is much easier to add support for new datasources as well as adding new functionality or fixing bugs.I also added support for writing
IAsyncEnumerable
to both excel and csv.#706 added support for writing asynchronously with the
IMiniExcelDataReader
. I moved this implementation intoMiniExcelDataReaderWriteAdapter
which usesIAsyncEnumerable
internally. This makes it incompatible with dotnet 4.5. @izanhzhAnother change which might be breaking is that writing an empty collection will no longer produce 1 row, but 0.