calamine icon indicating copy to clipboard operation
calamine copied to clipboard

[Feature Request] Row Properties

Open bonsairobo opened this issue 1 year ago • 1 comments

As far as I can tell, there is no support for extracting row properties from the row XML, e.g.:

<row r="430" ht="15.75" hidden="1" customHeight="1" outlineLevel="2">
    ...
</row>

I'm specifically interested in the outlineLevel attribute. It's apparently used for encoding a tree of rows that's relevant to our application.

Here's an example of another spreadsheet library that supports these extra properties: https://docs.sheetjs.com/docs/csf/features/rowprops/

And some Microsoft documentation: https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.row?view=openxml-3.0.1#properties

I've added experimental support for only the outlineLevel property here: https://github.com/tafia/calamine/commit/bde661381a3d424bf311518b484b60825a7276a8

I'm not confident that the API is right, and the implementation is a little hacky, but it serves the use case for now.

Is this feature something the maintainers are willing to support?

If so, my next question is: which attributes are common enough that supporting them is important? Should they be dynamic? The Msoft documentation link above has a fixed set of properties, but I suspect this is not exhaustive. I don't have evidence other than... you know... it's Microsoft. They're not exactly known for documenting stuff well.

bonsairobo avatar Mar 26 '24 08:03 bonsairobo