Questions tagged [xlconnect]

XLConnect is a comprehensive and platform-independent R package for manipulating Microsoft Excel files from within R. XLConnect differs from other related R packages in that it is completely cross-platform and as such runs under Windows, Unix/Linux and Mac (32- and 64-bit). Moreover, it does not require any installation of Microsoft Excel or any other special drivers to be able to read & write Excel files.

XLConnect: Excel Connector for R

XLConnect is a comprehensive and cross-platform R package for manipulating Microsoft Excel files from within R. XLConnect differs from other related R packages in that it is completely cross-platform and as such runs under Windows, Unix/Linux and Mac (32- and 64-bit). Moreover, it does not require any installation of Microsoft Excel or any other special drivers to be able to read and write Excel files. The only requirement is a recent version of a Java Runtime Environment (JRE).

The package can easily be installed from CRAN via install.packages("XLConnect") (or install.packages("XLConnect", type="source") on Mac OS X).

Alternatively, the package can be installed directly from github using the devtools package:

require(devtools)
# Installs the master branch of XLConnect (current development version)
install_github("xlconnect", username = "miraisolutions", ref = "master")

Resources:

226 questions
2
votes
2 answers

Does XLConnect package work with Java 8?

I updated my Java version and deleted the older versions of Java. Now my XLConnect package will not load in R because XLConnectJars won't load. Here is the error message. Loading required package: XLConnectJars Error : .onLoad failed in…
qdread
  • 3,389
  • 19
  • 36
2
votes
1 answer

R setRefClass workbook field

I am declaring a class using: setRefClass("XLSXFile", fields = list( wb= "workbook", sheet= "character", at.line= "numeric" ) ) The code does not compile. I get the error: Error in .local(.Object, ...) : …
2
votes
2 answers

How can we create a color scales for excel using R?

I want to create a color scale based on the input values from an excel spreadsheet.The required output is a color scaled cells in the excel sheet based on the values which is programmed in R.I tried through XLConnect but haven't yet found a…
Abinas Mishra
  • 21
  • 1
  • 3
2
votes
2 answers

R: XLConnect does not pass variable names

I would like to pass the results of a linear model calculation from R to a worksheet in Excel. For doing this I am using XLConnect with the following code: x <- 1000:2000 y <- 3*x+rnorm(length(x)) fit <- lm(y~x-1) result <-…
Andy
  • 9,483
  • 12
  • 38
  • 39
2
votes
1 answer

xlConnect R use of JVM memory

I'm running into a problem with JVM memory using XLConnect (Mirai Solutions) in R. Data loads into R just fine using loadWorkbook or readWorksheetFromFile, but larger data (data frames about 3MB) get stuck while being written to the JVM during…
user1566413
  • 41
  • 2
  • 3
1
vote
2 answers

Exporting .XLS file from openxlsx

I have a function that receives DataFrame does a bunch of transformations with openxlsx and exports the data from R to .xlsx: export_workbook_from_df <- function(data, path) { wb <- openxlsx::createWorkbook() openxlsx::addWorksheet(wb,…
1
vote
1 answer

R XLConnect write DF to existing workbook without column names

I'm trying to write data to the existing Excel template. I want to preserve cell formatting, so I use XLConnect package. Say I have nine cells, from G9 to I11, that I want to fill with numbers. I create a DF and next, following the instructions from…
Chris
  • 251
  • 1
  • 7
1
vote
1 answer

An R Loop to wrap text in multiple saved excel files

I have hundreds of excel files with a single column and a single sheet containing text. I am trying to write a loop that will 'Wrap Text' and align the single column in all of the files, preferably without reading the files into R. I already set the…
1
vote
2 answers

purrr::map_dfr gives number of list element as .id argument, not value of list element

I need to import a list of .xls files into R. Fairly standard operation, using file.list and purrr, done several times before. For some reason I cannot use readxl package as I keep getting libxls error, so switched to XLConnect, that seems to…
AadiR
  • 49
  • 8
1
vote
1 answer

Problems with XLConnect library - Windows 64 bit

I just started with Rstudio programming and I have some issues with XLConnect. I was able to install "XLConnect" package, then tried to load the "XLConnect" library and got an error as below. library(XLConnect) ERROR: package or namespace load…
1
vote
0 answers

Portably Append R Data to Excel Sheets (Without Overwriting)

Background I'm writing a .R script on my computer (Windows), which (1) must maintain a Log.xlsx file recording data from its runs; and (2) will be run by a colleague on a separate VM (also Windows). Requirements I'm looking for a package in R that…
Greg
  • 3,054
  • 6
  • 27
1
vote
1 answer

Combining multiple worksheets from multiple excel workbooks into a single workbook via. R

Lets say I have two excel workbooks (e.g. A.xlsx and B.xlsx) that each contain multiple worksheets (e.g. "a1" and "a2" in A.xlsx; "b1", "b2", and "b3" in B.xlsx). Note that these worksheets all have their own conditional formatting, filtering, zoom,…
user3624032
  • 59
  • 1
  • 5
1
vote
0 answers

XLConnect: It seems downloading the JAR dependencies may have failed

I have used XLConnect and XLConnectJar successfully for at least 5 years. Have just updated R to Ver 4.0.4 and XLConnect to 1.0.2 and get the following message when attaching: XLConnect: It seems downloading the JAR dependencies may have failed. If…
Stevesb
  • 31
  • 2
1
vote
1 answer

XLConnect Error: NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException

I want to use XLConnect package, however, I am facing unexpected issues. library(XLConnect) wb <- XLConnect::loadWorkbook("file.xlsx") Error: NoClassDefFoundError (Java): org/apache/poi/openxml4j/exceptions/InvalidFormatException Does anyone know…
Julia
  • 241
  • 1
  • 8
1
vote
0 answers

rJava 0.9-11 is not available (for R version 3.6.1)

i have a problem installing rJava on my Mac. I installed Homebrew, atom and java before because I want to create an excel data with the package XLConnect. In the description was written I have now to install rJava. When I want to install the package…