json2xlsx: Write a XLSX file from a JSON string

Description Usage Arguments Value Note Examples

Description

Write a XLSX file from a JSON string

Usage

1
2
json2xlsx(json1, json2 = "{}", json3 = "{}", outfile, overwrite = FALSE,
  dll = FALSE)

Arguments

json1

JSON string for the cells

json2

JSON string for the images

json3

JSON string for the passwords

outfile

name of output file

overwrite

logical, whether to overwrite 'outfile' if it exists

dll

logical, whether to use the DLL or the executable

Value

No returned value.

Note

This function is rather for internal purpose. The user should use hwriteXLSX.

Examples

1
2
3
4
5
6
7
colorMatrix <- matrix(grDevices::colours(), ncol=9)
f <- function(i, j){
  cell(j, i, value = colorMatrix[i,j], color = colorMatrix[i,j])
}
sheet <- list(Colors = do.call(Vectorize(f), expand.grid(i=1:73, j=1:9)))
json <- jsonlite::toJSON(sheet, null="null", auto_unbox = TRUE)
json2xlsx(json, outfile="colors.xlsx")

stla/hwriteXLSX documentation built on May 7, 2019, 10:40 a.m.