Changelog
Source:NEWS.md
gtxlsx (development version)
fmt_url()andfmt_email()produce real hyperlinks, and an<a href>in any HTML table does the same. A link that only points at a fragment of the source page is skipped, since it means nothing in a workbook.Where a cell holds several anchors, the first usable one is taken. A footnote marker pointing at a fragment of its own page no longer hides the real link beside it.
A
<tr>with no cells is a spacer the page uses for layout, and no longer lands as a blank row in the sheet.New
featuresargument onwb_add_gt()andwb_add_html()decides what is written besides the values: any of"font","fill","border","numfmt","merge"and"link".FALSEwrites values only, so a table that goes wrong in one respect can still be written in every other.New
freezeargument keeps the heading and the stub in view while scrolling.TRUEworks the split out from the table,c(row, col)puts it where you say.Links that cannot be written are reported: a warning names how many were dropped because a cell already had one, and how many pointed only into the source page.
wb_add_html()accepts anything with anas.character()method that returns HTML, so whatrvestandxml2hand back can be passed straight in: a whole page or a single<table>node.
gtxlsx 0.3.0
gtandmarkdownmoved to Suggests, andxml2is gone.wb_add_html()now needs nothing butopenxlsx2, so using it no longer pulls ingt’s dependency tree.HTML is read by a parser in the package rather than by
xml2. It handles markup an XML parser rejects:<br>, unquoted attribute values, unclosed<td>. Output forgt,lt,pivottabler,kable,htmlTableandtinytableis unchanged.CSS selectors are matched by walking their component chain, so
div > tdanddiv tdmean different things. Sibling combinators are skipped rather than guessed at.wb_add_gt()takes agt_group()orgt_split()object and writes the tables one after another, spaced bygap.Works with
gt1.1.0 through 1.3.0.9000. On a multi-column stub, gt recordscells_stub()styles under a different location name; that is handled now. Values printed without a leading zero, asdrop_leading_zerogives, stay numbers.Minimum R version is 3.6.0. Nothing in the package needed 4.1.
gtxlsx 0.2.0
Fixed border and fill handling. A border spanning several rows reached only the last of them, and striped tables left the plain rows unfilled, which showed as detached blocks rather than banding.
The CSS reader handles nested rules,
var()custom properties and positional pseudo-classes such as:not(:last-child), solttables keep their borders.New
row_heightsargument, off by default, sets row heights from gt’s padding and centres the text to match.
gtxlsx 0.1.1
Group headings and summary labels are no longer forced bold; the weight follows the
gtoption.Spanners get the bottom border
gtdraws under them, and column labels get their vertical lines underopt_table_lines("all").