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

StreamWriter-like API when reading #1284

Open
thomascharbonnel opened this issue Jul 22, 2022 Discussed in #1276 · 2 comments · May be fixed by #1291
Open

StreamWriter-like API when reading #1284

thomascharbonnel opened this issue Jul 22, 2022 Discussed in #1276 · 2 comments · May be fixed by #1291

Comments

@thomascharbonnel
Copy link
Contributor

Discussed in #1276

Originally posted by thomascharbonnel July 11, 2022
Hello,

First, thanks a lot for the amount of work you have put into this library, it's great! I'm happy to finally have an alternative to Apache POI!

I have a question that is somewhat related to an issue that was open earlier. Currently, excelize has a "stream reader" API using f.Rows() and row.Columns. Now, what Columns() returns isn't identical to what is expected when writing to a worksheet using StreamWriter. By that i mean that Columns() will only give you the cells' values, not all its attributes (value, style, formula), while on the other hand, streamwriter allows you to write the value+style+formula.
I'd like to create an API similar to StreamWriter when reading (ie. i'd like to be able to read the value+style+formula at the same time when reading a cell), do you think that would be a good idea? If yes, any pointers to get started?

Thank you! 🙏

thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Jul 25, 2022
@thomascharbonnel
Copy link
Contributor Author

thomascharbonnel commented Jul 25, 2022

Hi @xuri,

This is a WIP for this feature: master...thomascharbonnel:excelize:1284-streamreader-return-cell(so some of the tests aren't passing yet)

I've reused StreamWriter's Cell structure, though it might make sense to create a separate structure?
I was thinking, in order to keep the ability for users to get a string with the proper excel styling, to define the appropriate String() on Cell.

Please feel free to suggest improvements if you have any in mind! Thank you!

thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Jul 25, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Jul 27, 2022
@thomascharbonnel thomascharbonnel linked a pull request Jul 27, 2022 that will close this issue
10 tasks
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Jul 27, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Jul 27, 2022
@xuri
Copy link
Member

xuri commented Jul 27, 2022

Thanks for your issue. The stream function was created for reading and writing a large data efficiently, at that time, I think maybe getting the value of the cell is the most typical scenario, getting the other attributes of the cell was not very usually, user can get these attributes by normal mode functions, so I have not implemented this feature.

I reconsider this design at this time, and I've left some comments for the draft PR.

thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 1, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 1, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 4, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 4, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 4, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 4, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 11, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 11, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 17, 2022
thomascharbonnel pushed a commit to thomascharbonnel/excelize that referenced this issue Aug 17, 2022
@xuri xuri linked a pull request Aug 26, 2022 that will close this issue
10 tasks
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 a pull request may close this issue.

2 participants