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
1 answer

R script for exporting custom list of numbers and letters into Excel

To help with some regular label-making and printing I need to do, I am looking to write a script that allows me to enter a range of sequential numbers (some with string identifiers) that I can export with a specific format to Excel. For example, if…
Ryan
  • 11
  • 5
0
votes
2 answers

how to merge columns of multiple excel files in R?

I have many Excel files.Every file having same format and number of columns.Suppose, file A containing data 501 0006232.txt 0006235.txt 502 0.019047619 0.045989773 0006236.txt 503 0.042735043 0.116345945 …
Alvi
  • 123
  • 1
  • 3
  • 14
0
votes
1 answer

The R package XLSX is converting entire column to string or boolean when one cell is not numeric

I am using a shiney interface under R to read in a CSV file and load it into one sheet of an excel xlsm file. The file then allows user input and preforms calculations based on VBA macros. The R xlsx package is working well for preserving the VBA…
0
votes
1 answer

rJava Package installation failed (needed for xlsx package)

When I want to install the xlsx package, I get this error : Loading required package: rJava Error : .onLoad failed in loadNamespace() for 'rJava', details: call: fun(libname, pkgname) error: JAVA_HOME cannot be determined from the…
0
votes
1 answer

Package xlxs installation in R has issues

When trying to install package xlxs in R I get the following error. error: No CurrentVersion entry in Software/JavaSoft registry! Try re-installing Java and make sure R and Java have matching architectures. Not sure what to do. I have tried…
0
votes
1 answer

how to get cell fill colors

I am trying to get the string value of a cell from a workbook, using xlsx package. Using the getFillBackgroundColorColor() and getFillForegroundColorColor() methods I get back Java-Object gibberish, like…
Eric
  • 1,381
  • 9
  • 24
0
votes
0 answers

R encountered a fatal error, This session was terminated When using write.xlsx append

I try to write a df to an existing excel file by using write.xlsx(df, filename.xlsx, sheetName=123, append=TRUE). After run the code two times, R studio encountered a fatal error, and I have to uninstall Rsudio and reinstall it. But I still have the…
futong
  • 33
  • 4
0
votes
1 answer

R XLSX and XLConnect packages - Formatting the workbood object created by XLConnect using xlsx package?

I have written a R code to create excel workbook and added the data to it using XLConnect package. wb <- XLConnect::loadWorkbook(Name,create = TRUE) and added some data frame to this file. Now, I want to access this XLConnect object wb from xlsx…
Raj
  • 1
  • 1
0
votes
0 answers

xlsx: error of adding massive number of rows to the worksheet - "invalid row number"

I am using xlsx::addDataFrame to write 450,000 rows of a data.frame to a sheet and get the "Invalid row number" error. Can anybody tell me how to fix it? Or is there anyway to bypass this difficulty? Any command is appreciated. Thanks a…
0
votes
0 answers

Replace specific value in dataframe cell R

I have a large xlsx file; I am interested in 2 columns: pat_id and param_1. The original file looks like this (I replaced values with dots just to type faster): ......pat_id...........param_1.......... row1…
Uylenburgh
  • 1,277
  • 4
  • 20
  • 46
0
votes
1 answer

Import excel with duplicate columns that end with a number (r xlsx)

I have an xlsx file that contains let's say 4 columns: Thingie1 Thingie1 Thingie2 Thingie2 (I know it's stupid... it's because I am combining data from 2 different databases, and the 1 and 2 denote a difference between survey 1 and survey 2 and…
Amit Kohli
  • 2,860
  • 2
  • 24
  • 44
0
votes
1 answer

Write multiple data frames to correct excel sheets using for loops

I have a nested for loop situation where I am looping through several excel work sheets, applying several functions, generating a single data.frame from each work sheet, and writing all of this back to a new work book whose sheet names are the same…
J.Con
  • 4,101
  • 4
  • 36
  • 64
0
votes
1 answer

how to open sheet using hyperlink in R

I have sales data in an Excel file in that I have to open in sheet3. I tried below code but am unable to give hyperlinks to sheet3. library(xlsx) wb <- createWorkbook() sheet1 <- createSheet(wb, "Sheet1") rows <- createRow(sheet1) cells <-…
narayana
  • 1
  • 1
0
votes
1 answer

Exporting data into excel and giving hyperlinks

I tried the code below for giving hyperlinks to another file library(xlsx) wb <- createWorkbook() sheet1 <- createSheet(wb, "Sheet1") rows <- createRow(sheet1, 1:10) # 10 rows cells <- createCell(rows, colIndex=1:8) # 8 columns links <- c("D://r…
0
votes
1 answer

Formatting a XLSX file in R into a custom text blob

I want to read a xlsx file and I want to convert the data in the file into a long text string. I want to format this string in an intelligent manner, such as each row is contained in parentheses “()”, and keep the data in a comma separated value…
webDevleoper101
  • 69
  • 3
  • 14
1 2 3
8
9