Closed pbbgss closed 3 months ago
Curious! Thank you for digging into it and reporting it.
To confirm: I can replicate it locally on my machine too. Odd, of course, because I'm pretty sure tab names can start with numbers when you create a workbook manually.
I think this should be an error. We could warn and automatically prepend with an underscore or something, but I think the change should be at the user's discretion. And for sure, a note in the function documentation, vignettes and website would be a good idea.
Cheers! I hope to do it this week.
Yea I had checked previously that I could have an Excel tab staring with a number and that it wold survive conversion to ODS.
MS Excel seemed to be able to recover the workbook OK despite the error but I decided it is probably better for accessibility/ general usability purposes to have "Table" in the tab name rather than just the table number anyway.
Thanks for taking a look at it so quickly!
Cracking, just merged and released v0.3.1, which should do the trick. Thanks again for filing the issue.
If any of the elements in the character vector passed to the
tab_names
argument ofa11ytables::create_a11ytable()
start with an integer it causes an XML issues when creating the xlsx workbook. When the file is opened it needs to be "repaired"This XML file does not appear to have any style information associated with it.
Not sure if is specific to the environment where I'm working (MoJ Analytical Platform) and it is definitely not a major issue but took me a while to figure out it was the tab names causing it. Also not sure if it is an {a11ytables} or {openxlsx} thing. Might it be worth a note in the documentation in case other people run into the issue or perhaps one for inclusion in the "automatic tab name correction"?
Really appreciate your work on this package!
Package versions:
Example
This is the example from the {a11ytables} vignette with just the tab names changed