Questions tagged [r-xlsx]

The xlsx library in R has capabilities for reading and writing Microsoft Excel files

From CRAN:

Provide R functions to read/write/format Excel 2007 and Excel 97/2000/XP/2003 file formats.

xlsx uses Java (through rJava) on the back end to read and write .xls and .xlsx files.

Package written and maintained by Adrian Dragulescu.

126 questions
0
votes
0 answers

Is there a function in "xlsx" package similar to "setStyleAction" in "XLConnect"?

I have a sheet that looks like this: sample data What I want to do is fill values in empty cells using data from some other excel file, but without overwriting the other data (and it's formatting). After some search I found that the command…
0
votes
1 answer

Error opening Excel file in R using xlsx

I recently installed R 3.2.0 (Windows 64 bit) with packages xlsx, which depends on rJava and xlsxjars. Java 1.8.0_11 64 bit is installed on the machine. When I try to use the read.xlsx() function, I get the following error about a zipfile: >…
Greg Graham
  • 473
  • 7
  • 18
0
votes
1 answer

read.xlsx function is reading one of my variables as "factor" instead of "POSIXct"

I have an xlsx file with a number of variables (columns). Quite a few are listed in date format (MM/DD YYYY HH:MM A/P) in the .xlsx file. When I load this file into R using read.xlsx, all of the variables with date format load as POSIXct except ONE,…
Ben
  • 53
  • 4
0
votes
0 answers

read.xlsx() one row each time keeps getting OutOfMemoryError: Java heap space

I am new to R and want to import an Excel file into SQL Server. Each time,read 1 row and insert 1 row using sqlQuery(as I worry about some big excel sheet in the future). Only after 7 rows inserted and the error pops up and keeps coming during later…
Bylon
  • 21
  • 1
  • 6
-1
votes
2 answers

Write to a new sheet in a loop

My loop is completely doing what I want it to do apart from when writing out the data I want it to loop through and open a new sheet each time, it is not doing this but simply overwriting the data in the single excel file. My code is: file2 <-…
user12847974
-1
votes
1 answer

R write xlsx files converting blank cells in a numeric output

I have a matrix like this > df <- head( iris ) > df[2,3] <- NA > df[2,5] <- NA > df[3,5] <- NA with some NA. So, if I put convert NA like this df[is.na( df )] <- "#N/D" df becomes a character matrix and when I write.xlsx my file excel contains a…
Francesco
  • 3
  • 2
1 2 3
8
9