jsonkenl / xlsxir

Xlsx parser for the Elixir language.
MIT License
212 stars 83 forks source link

How does one get the number of sheets in a workbook? #121

Open dannypurcell opened 11 months ago

dannypurcell commented 11 months ago

Or otherwise use the stream_list function to stream through all sheets without either knowing how many there are in advance or guessing until it throws an exception?

It seems like I'm just missing something about how to use the streaming API. Is there a function for this which I have just overlooked in the code?

I can see how multi_extract iterates the sheets with the worksheet_xml_files struct function, but I haven't spotted an API function for counting them and I don't want to call multi_extract and therefore load the whole file into memory just to get the number of sheets.