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
2 answers

Unable to import xlrd module in python 3

I'm getting this error "SyntaxError: multiple statements found while compiling a single statement" when trying to import xlrd in python on Windows. I have installed the newest version xlrd and python(3.7.0). Can you please help me figure out what…
Pixeline
  • 11
  • 1
0
votes
1 answer

conditionalFormatting() on a character column in R with openxlsx package

I am trying to create excel table outputs from within R using the openxlsx package. Before creating outputs I need to put a two types of conditional formatting on my values. But I have not been able to accomplish this since I have numeric stored as…
Ayushi Kachhara
  • 159
  • 1
  • 9
0
votes
1 answer

Using openxlsx startRow parameter to pick first row based on the contents of the file

I know that the startRow parameter in the read.xlsx function in openxlsx allows me to read a file starting at a designated row. I have to load 300 xlsx files, unfortunately, the number of rows that I want to skip varies between the files. I always…
MatthewR
  • 2,660
  • 5
  • 26
  • 37
0
votes
0 answers

R. Appending list to list and export each list to individual excel sheets in one excel workbook

I'm trying to understand why part of my appended list is getting chopped off when exporting to excel. I can separate a dataframe by a grouping variable into separate lists: data(iris) split_tibble <- function(tibble, col = 'col') tibble %>% split(.,…
Jonni
  • 804
  • 5
  • 16
0
votes
1 answer

Does anyone know how to interact with .xlsx files located on Dropbox via a hosted Shiny app?

I made a relatively elaborate Shiny app for my job that runs great locally. However, I am trying to host the app so that users who don't have R Studio downloaded can access it. I cannot get the app to run through shinyapps.io. It seems this is…
reidj
  • 310
  • 1
  • 11
0
votes
1 answer

Using attributes in R to hold metadata when pivoting wider for export to xlsx

I have a dataframe that looks something like: df <- tribble(~date, ~value, ~analyte, ~quantified, 01-01-2020, 8.6, Fe, TRUE, 02-06-2020, 10.4, Ni, TRUE, 01-01-2020, 2, Ni, …
vorpal
  • 268
  • 4
  • 17
0
votes
1 answer

How to prevent converting numbers into scientific form while importing excel files in R?

Using Openxlsx package and read.xlsx function. It reads the data but converts numbers into scientific form. The number is 132178278. It gets converted to 132178278E8. Tried using the read.xlsx function from xlsx package. But it takes too long to…
0
votes
1 answer

R Openxlsx package (version 4.2.2) - Error in file(description = xlsxFile) : invalid 'description' argument

Problem: I am experiencing some very odd behaviour with openxlsx read.xlsx. Set up. I have a directory of data (called "Data"!!!) on my Onedrive containing a whole bunch of Excel spreadsheets. The spreadsheets are similar in structure but not…
Peter King
  • 91
  • 8
0
votes
1 answer

Function to export multiple data in list to separate Excel sheet

I'm trying to create a function to export multiple list elements to an excel workbook with different sheets. I get the error: "Error in if (nchar(sheetName) > 31) { : missing value where TRUE/FALSE needed". My attempt is…
user13589693
  • 369
  • 1
  • 8
0
votes
1 answer

Input Multiple sheets of Excel in R

I'm trying to in put multiple sheets of excel using for loop in R and do some impuations. The code which i have written is below, sheet <- getSheetNames("market_latest.xlsx") for (i in 2:length(sheet)-1){ data[i] <-…
0
votes
1 answer

Export xlsx files from table as seperated filtered column

I have a dataset df aa1 bb1 ccc aa2 bb2 ccc aa3 bb3 ddd aa4 bb4 ddd aa5 bb5 eee I want to export as xlsx files each of them seperated filtered column write.xlsx(df, 'files(ccc,ddd,eee,...).xlsx') output of ccc.xlsx aa1 bb1 ccc aa2 bb2…
ersan
  • 393
  • 1
  • 9
0
votes
2 answers

Conditional formatting of .xlsx by 'Does not contain [text]' in R-package "openxlsx"

I want to use the R-package 'openxlsx' to do conditional formatting of a .xlsx file, but I can't figure out how to format a cell if the value does NOT contain a certain textstring. In the following example (which works perfectly) i am formatting the…
Sjakalen
  • 1
  • 2
0
votes
1 answer

Write multiple describeBy summaries to individual worksheets in an Excel workbook using openxlsx

I have a large data frame that I summarize in multiple ways using describeBy from the psych library as follows: library(tidyverse) library(openxlsx) library(psych) . . . # Describe by Region lst1 <- describeBy(df[QUESTIONS],…
Thomas Philips
  • 935
  • 2
  • 11
  • 22
0
votes
1 answer

R openxlsx read.xlsx having issues with datetime

This question seems to have been asked a number of times - without a blanket useful fix - so I am trying again. My excel data time column has the format: "MM/DD/YY HH:MM" I am using the following code to read in the file: datai <-…
melmo
  • 757
  • 3
  • 15
0
votes
1 answer

Is it possible to edit Y - axis value in excel?

I am trying to generate a sales graph using xlsxwriter. In y-axis, the values are coming as 20000, 40000 etc. I want it come as 10k, 20k etc. Is it possible to do same in excel using xlsxwriter.
Kshitish Das
  • 67
  • 1
  • 7