Exporting an interactive pivot table to excel


#1

At my company, Excel pivot tables are an extremely popular way to view and manipulate data. Of course, we all know that pivots are really just aggregation operations, easily accomplished with the tidyverse, but the interactivity of the pivot table is a powerful thing. I now find myself in a situation where the most effective way forward is to provide my raw data as a data source, but also provide an Excel pivot table so that business users have a convenient way to interactively aggregate/disaggregate as needed.

Question being, is there any set of R tools that would allow me to take a data frame and export an Excel pivot table, one that properly has the expand/collapse functionality? I’ve looked at both pivottabler and rpivottable, both of which seem to rely on HTML widgets. Is there a package out there that can produce the Excel-native format?