openxlsx

openxlsx::write.xlsx overwriting existing worksheet instead append

感情迁移 提交于 2021-01-29 11:22:37
问题 The openxlsx::write.xlsx function is overwriting spreadsheet instead of adding another tab. I tried do follow some orientations of Stackoverflow, but without sucess. dt.escrita <- format(Sys.time(), '%Y%m%d%H%M%S') write.xlsx( tbl.messages ,file = paste('.\\2_Datasets\\messages_',dt.escrita,'.xlsx') ,sheetName = format(Sys.time(), '%d-%m-%y') ,append = FALSE) write.xlsx( tbl.dic.dados ,file = paste('.\\2_Datasets\\messages_',dt.escrita,'.xlsx') ,sheetName = 'Dicionario_Dados' ,append = TRUE)

openxlsx Excel formulae in a row, how to create formula dynamically for each column

我与影子孤独终老i 提交于 2021-01-29 02:02:35
问题 My Goal I have a data set with several columns stored in an excel file. For each column I need to insert statistical formulae on the side of the data set. The formulae should be created dynamically. For the sake of the example, lets create an example 3 columns by 10 rows, so that anyone can follow. wb <- createWorkbook(title = "simulation") addWorksheet(wb, "stats") # create a sheet writeData(wb, "stats", data.frame(A=c(1:10)*pi, B=1/c(6:15), C=sqrt(11:20))) # store the example data frame

openxlsx Excel formulae in a row, how to create formula dynamically for each column

雨燕双飞 提交于 2021-01-29 02:02:07
问题 My Goal I have a data set with several columns stored in an excel file. For each column I need to insert statistical formulae on the side of the data set. The formulae should be created dynamically. For the sake of the example, lets create an example 3 columns by 10 rows, so that anyone can follow. wb <- createWorkbook(title = "simulation") addWorksheet(wb, "stats") # create a sheet writeData(wb, "stats", data.frame(A=c(1:10)*pi, B=1/c(6:15), C=sqrt(11:20))) # store the example data frame

Openxlsx hyperlink output display in Excel

≡放荡痞女 提交于 2020-12-13 04:08:28
问题 I am trying to take in a data frame an excel sheet that has two columns, Column A contains names of stores Column B contains the URL of those stores. I would like to take Column A and make it a clickable hyperlink so instead of plain text, it is a hyperlink to the store website. I have attempted to use openxlsx package to generate the correct output. I have attempted to use the following code snip. x <- c("https://www.google.com", "https://www.google.com.au") names(x) <- c("google", "google

Openxlsx hyperlink output display in Excel

丶灬走出姿态 提交于 2020-12-13 04:06:38
问题 I am trying to take in a data frame an excel sheet that has two columns, Column A contains names of stores Column B contains the URL of those stores. I would like to take Column A and make it a clickable hyperlink so instead of plain text, it is a hyperlink to the store website. I have attempted to use openxlsx package to generate the correct output. I have attempted to use the following code snip. x <- c("https://www.google.com", "https://www.google.com.au") names(x) <- c("google", "google

Multiple styles() applied to the same row with package openxlsx

爷,独闯天下 提交于 2020-08-24 06:54:05
问题 I started using the R package openxlsx recently because it does not require the rJava package or Java at all. I'm trying to write dates to a column but row formatting isn't being applied to the final date column in my xlsx file. Example data: tmp <- structure(list(someNumbers = c(8L, 3L, 4L, 4L, 1L, 4L, 2L, 2L, 7L, 2L), someLetters = structure(c(9L, 4L, 1L, 2L, 7L, 3L, 4L, 6L, 8L, 5L), .Label = c("b", "d", "e", "h", "l", "n", "o", "t", "u"), class = "factor"), moreNumbers = c(25L, 25L, 36L,

I get a corrupted file when I use Openxlsx

扶醉桌前 提交于 2020-02-07 02:36:48
问题 I am using openxlsx to Write to existing xlsx file without altering the formatting. my file is "razii.xlsx. I have done the following tasks: library(openxlsx) df1<-read.xlsx("C:/data/razii.xlsx",startRow = 3) Next, I have analysed two columns using 'razii.xlsx' using R codes and I called it df2. Now I want to write to the existing xlsx file without altering the formatting. I have used the following codes: wb <- loadWorkbook(file = "C:/data/razii.xlsx") addWorksheet(wb, "Razii") x <- df2

I get a corrupted file when I use Openxlsx

孤者浪人 提交于 2020-02-07 02:36:09
问题 I am using openxlsx to Write to existing xlsx file without altering the formatting. my file is "razii.xlsx. I have done the following tasks: library(openxlsx) df1<-read.xlsx("C:/data/razii.xlsx",startRow = 3) Next, I have analysed two columns using 'razii.xlsx' using R codes and I called it df2. Now I want to write to the existing xlsx file without altering the formatting. I have used the following codes: wb <- loadWorkbook(file = "C:/data/razii.xlsx") addWorksheet(wb, "Razii") x <- df2

Shiny + downloadHandler + Openxlsx does not generate a xlsx file

↘锁芯ラ 提交于 2020-01-25 04:47:25
问题 I'm trying to generate a .xlsx file through the Openxlsx package with a reactive name and header inside file (the input variables are "ASL.1" and "Year.1"). The object to be saved in the file is the reactive table "tab_1 ()", that is generated by the app without any problems, but when I try to download it the name that is generated by the browser (Chrome) is not (i.e.) "Tab_1_TOSCANA_2015".xlsx" but "download_tab_1", the outputId of the button "download" associated, and nothing is generated.

Using two versions of openxlsx forks in same file

自古美人都是妖i 提交于 2020-01-16 19:06:28
问题 I am using excel templates to collect data from various people. To minmize the chances of people changing the structure of the templates I wanted to protect the sheets, but still allow them to fill in the data values that I want. At the same time I also use the dataValidation command that one can only use once in the Cran version (Stack Question) I was happy that i found a forked version of the openxlsx package that has included a function protectWorksheet to enable sheet protection, Link.