Use R and Openxlsx to output a list of dataframes as worksheets in a single Excel file
问题 I have a set of CSV files. I want to package them up and export the data to a single Excel file that contains multiple worksheets. I read in the CSV files as a set of data frames. My problem is how to construct the command in openxlsx , I can do it manually, but I am having a list construction issue. Specifically how to add a data frame as a subcomponent of a named list and then pass as a parameter to write.xlsx() Example Ok, so I first list the CSV files on disk and generate a set of data