Reads per-axis style rules embedded in worksheet XML and returns one row per axis per worksheet.
Value
A tibble with columns:
- sheet
Worksheet name.
- axis
Axis identifier (e.g.,
"rows","cols", or"automatic").- field_ref
Column reference if axis is field-specific;
NAotherwise.- field_clean
Human-readable field name;
NAif not field-specific.- scale_type
Scale type (
"linear","log", …) if present;NAotherwise.- reversed
Logical:
TRUEif axis is reversed.- include_zero
Logical:
TRUEif zero is pinned on axis.
Examples
xml <- xml2::read_xml(
'<workbook>
<worksheets>
<worksheet name="Sheet1">
<table>
<style>
<style-rule element="axis">
<format attr="reverse" value="false"/>
<format attr="scale-include-zero" value="true"/>
</style-rule>
</style>
</table>
</worksheet>
</worksheets>
</workbook>'
)
twb_sheet_axes(xml)
#> # A tibble: 1 × 7
#> sheet axis field_ref field_clean scale_type reversed include_zero
#> <chr> <chr> <chr> <chr> <chr> <lgl> <lgl>
#> 1 Sheet1 automatic NA NA NA FALSE TRUE
