Questions tagged [openxlsx]

Use this tag for questions related to the openxlsx package. The openxlsx package provides functions to make it easy to read, write and edit XLSX Files in the R programming language.

The package simplifies the creation of Excel files in the programming language by providing a high level interface to writing, styling and editing worksheets. Through the use of , read/write times are comparable to the xlsx () and packages with the added benefit of removing the dependency on Java.

For more information on the package see:

Original author: Alex Walker
Current maintainer: Philipp Schauberger

410 questions
0
votes
1 answer

Error in zip_internal(zipfile, files, recurse, compression_level, append = FALSE, : Some files do not exist

Received this error message from R when using openxlsx package, not sure where to look. Error in zip_internal(zipfile, files, recurse, compression_level, append = FALSE, : Some files do not exist Does anyone have any suggestions? thanks.…
Xu Jason
  • 1
  • 3
0
votes
0 answers

Subscript out of bounds for auto_crosstab_to_wb in R

I have the below cross tabulation MARITAL_STATUS bal_bands COHABIT DIVORCED MARRIED OTHER SEPARATED SINGLE WIDOW <£0 30 65 383 58 13 935 176 £0 20 128 271 41 …
MLPNPC
  • 454
  • 5
  • 18
0
votes
0 answers

Unable to Install openxlsx library in R

I have been trying to install "openxlsx" library in R. I have R 3.4.0 and tried installing "openxlsx" from cran and from package archive (local folder) as well but none of them let me install this package. Below is the log message. Can someone…
Ravindar G
  • 17
  • 6
0
votes
0 answers

Readxl and openxlsx add extra characters to numbers from an excel file

I have some numbers in an excel file that I want to read into R as characters. When I import the file either using readxl or openxlsx, the imported data have two extra characters, which are not in the excel file. The excel sheet looks like…
Ricecakes
  • 681
  • 1
  • 5
  • 13
0
votes
1 answer

Export a data frame as multiple worksheets in a single Excel file in R

I have a dataframe like this dummy data: df <- data.frame( stringsAsFactors = FALSE, id = c( "100-1", "100-1", "100-2", "100-2", "100-5", "100-5", "100-5", "100-9", "100-9", "100-9" ), name = c( …
DanG
  • 689
  • 1
  • 16
  • 39
0
votes
1 answer

How to set a readable xlsx range in read.xlsx() in openxlsx

I am using read.xlsx() function to read a xlsx file, with colNames = FALSE, rowNames = TRUE arguments, everything was fine, but after adding a line of variable, it pops up error saying Error in ".rowNamesDF<-"(x, value = value) : missing values…
Negrito
  • 220
  • 1
  • 9
0
votes
3 answers

I am facing error in pasting an image in Excel from R using package openxlsx

I am trying to paste an image saved in my folder to Excel using R package openxlsx. I have completely studied the package documentation and followed the steps given in the documentation. But even the example given in package is not working for me ##…
0
votes
1 answer

R and openxls, getting error trying to create several xlsx

im trying to make a function that takes two files, say x and y, and returns a xls book, the function would create a number of sheets with the names selected from the x file, x would look like this sol Orden 1 Z169 2 Z170 3 Z175 now, with…
mimus
  • 53
  • 5
0
votes
1 answer

How to change Column Names to Bold font style in Excel

wb <- loadWorkbook("file.xlsx") sheets <- getSheets(wb) setColumnWidth(sheets[[1]], colIndex=1:ncol(df), colWidth=20) saveWorkbook(wb,paste(Sys.Date(), "_abc.xlsx")) How do I change Column Names to Bold font style in Excel using R.
Anshuman
  • 39
  • 1
  • 5
0
votes
1 answer

How to allow filtering by year, month, date in XLSX generated by openxlsx

I've started to generate XLSX files instead of CSV through openxlsx. However, I'm experiencing a different behavior in what concerns Date filtering. I've generated the following dummy code: library(openxlsx) df <- data.frame(ID=c(1,2,3,4,5,6),…
asuka
  • 2,249
  • 3
  • 22
  • 25
0
votes
1 answer

Delete hyperlink as well as content from cell

I have an excel sheet which contains a hyperlink. I am editing this excel sheet from R using the openxlsx package to read and edit it and to save it afterwards again. One step involves deleting all data from a certain range: openxlsx::deleteData( …
Rainer
  • 8,347
  • 1
  • 23
  • 28
0
votes
0 answers

Openxlsx tables with more than one factor level

I am trying to make a script that will make grabbing and viewing descriptive information and statistics as easy as possible for all my current and future research projects. Openxlsx is working wonders so far, but I have encountered a critical flaw…
0
votes
1 answer

Saving Excel files in loop in r

I have data frame and created a subset of it. I split the data frame and its subset by a variable factors. I want to save it in excel file. I want to write a loop to create multiple excel files data frame and subset files are in sheets by a…
Saaz
  • 55
  • 7
0
votes
0 answers

How to run a macro and copy a worksheet from Excel in R

So my question can be divided into two parts: 1. How to run a macro in an .xlsm file in R. (The macro generates a chart in another sheet)2. How to copy this generated chart into another workbook I am trying to automate some procedural work and…
0
votes
1 answer

How to repair R car package failure to load?

After attempting to install R openxlsx package, car package now fails to load. How do I repair R car package load error (R version 3.5.2.)? I have checked imports/dependencies for the car package - openxlsx present. So how the message below can be…
CK7
  • 229
  • 1
  • 11