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
3
votes
3 answers

R - Error: IllegalArgumentException (Java): Your InputStream was neither an OLE2 stream, nor an OOXML stream

I use R XLConnect package. When I wrote 'XLConnect' function, such as loadWorkbook(), readWorksheetFromFile() etc. , this error message happen. Error: IllegalArgumentException (Java): Your InputStream was neither an OLE2 stream, nor an OOXML…
Luis Kang
  • 251
  • 1
  • 4
  • 15
3
votes
1 answer

Using R and XLConnect to read Excel time

I am using R to read an Excel file that contains two columns with times in 12hr format test.xlsx => A1: 1:40:50 p.m. A2: 00:00:00 a.m.. I have installed the XLConnect package to read the file so I scripted this: library(XLConnect) a <-…
R. Schifini
  • 9,085
  • 2
  • 26
  • 32
3
votes
0 answers

Search in excel workbook with R

How to search within excel workbook programmatically using R? Say I want to locate string "foo" and return all the cell addresses (row, col, worksheet name) where the text resides. Is there any convenience function, instead of writing own script…
Daniel Krizian
  • 4,586
  • 4
  • 38
  • 75
3
votes
0 answers

XLConnect crashing R when java.params modified

Loading the XLConnect package after modifying the java.parameters options (possibly incorrectly) crashes R on my local machine. On a remote machine, attempting to load the package throws an error. (Both R 3.0.2) The linux machine has ample RAM…
Ricardo Saporta
  • 54,400
  • 17
  • 144
  • 178
3
votes
3 answers

JAVA_HOME cannot be determined error with XLConnect

I'd apreciate your help: i'm trying to run XLconnect but I receive this error message: > library("XLConnect", lib.loc="C:/Users/1144143929/Documents/R/win-library/2.15") Error : .onLoad failed in loadNamespace() for 'rJava', details: call:…
RLearner
  • 31
  • 1
  • 4
3
votes
1 answer

How to ignore hidden data when importing from Excel

I have a collection of excel files which I am importing into R. The files contain hidden data which I would like to disregard -- eg, simply not importing it, or importing it with a flag indicating it was hidden so that I can then drop it. The…
Ricardo Saporta
  • 54,400
  • 17
  • 144
  • 178
3
votes
1 answer

XLConnect loadWorkbook error - POIXMLException (Java)

I'm trying to load a hefty Excel workbook (.xlsm format, ~30 mb) that has a large number of array calcs. > wb1 <- loadWorkbook("Mar_SP_20130227_V6.1.xlsm") Error: POIXMLException (Java): java.lang.reflect.InvocationTargetException But I am able to…
Tommy O'Dell
  • 7,019
  • 13
  • 56
  • 69
2
votes
2 answers

Using list names as names for sheets using XLConnect

As the title suggest, I would like to do the above. Example below: library(stringr) library(XLConnect) df <- data.frame(do.call("rbind", lapply(1:10, function(i) rnorm(10)))) df.list <- rep(list(df), 10) names(df.list) <- paste("DataFrame",…
RJ-
  • 2,919
  • 3
  • 28
  • 35
2
votes
0 answers

R Studio Error :- (Java):Could not initialize class com.miraisolutions.xlconnect.workbook

I have to use XLConnect package for my work. XLconnect Package is perfectly installed and all other package dependencies are also installed. This package was working fine some time ago but now this is not able to read my files. Also, this package…
Rishabh
  • 101
  • 1
  • 4
2
votes
0 answers

Problems installing/importing XLConnect and rJava in RStudio

Hope to get some help here. I just installed R-Studio (Version 1.3.1093) and tried to install some packages (e.g XLConnect). I got an error message and it seems like it's a Java issue (see code below, JRE and R version below). But since I'm not an…
Zoerew
  • 21
  • 1
2
votes
0 answers

How to write data into a macro-enabled Excel file (write.xlslx corrupts my document)?

I'm trying to write a table into a macro-enabled Excel file (.xlsm) through the R. The write.xlsx (openxlsx) and writeWorksheetToFile (XLconnect) functions don't work. When I used the openxlsx package, as seen below, the resulting .xlsm files ended…
R_XSLM
  • 21
  • 1
2
votes
0 answers

Export data to an Excel .xlsx pre-formatted template

I would like to export some result datasets to several sheets of a "template" xlsx file which is already pre-formatted (size, format of cells, filter on header, etc... already existing in the template). I just want to fill the template with the…
MaRius
  • 21
  • 4
2
votes
2 answers

How to read in multi line excel cells into R

I am trying to read in an excel file into R. The data is formatted as follows: As you can see, there are cells with multi line information. I am taking this excel file and putting it up on R shiny as a question. (As radio buttons) Now if I read it…
2
votes
0 answers

Installing XLConnect package

I was wanting to install XLConnect package so that i could save my databses created from RSQLite in different formats. But when i do install.packages("XLConnect") it seems to give error checking whether Java run-time works... ./configure: line…
mrigank shekhar
  • 544
  • 3
  • 15
2
votes
0 answers

Error: package or namespace load failed for 'XLConnectJars'

I've installed the XLConnect package and attempted to load it in my R script. However, an error occured as below. As I have no knowledge about Java, after googled around I still find no way to solve this. > library(XLConnect) Loading required…
Cecilia Lee
  • 775
  • 1
  • 11
  • 20
1 2
3
15 16