Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
39 views

I have made SPEI values for a time series from 1987-2022 and I am trying to export these values corresponding with the year and month into an excel file - but the output file is not giving me the ...
Andrea Robinson's user avatar
2 votes
1 answer
74 views

Suppose I have a workbook with some NAs in it: df <- data.frame(a = 1:3, b = c(1, NA, NA), c = c(NA, 2, 3)) xlsx::write.xlsx(df, 'df.xlsx') wb <- xlsx::loadWorkbook('df.xlsx') I want the data ...
js4032's user avatar
  • 402
0 votes
1 answer
56 views

When I call xlsx::write.xlsx() on a tibble with 2+ rows it crashes: df <- structure(list(`region name` = c("Reg 1", "Reg 2"), `value` = c(1.38755717255717, ...
asd-tm's user avatar
  • 5,265
1 vote
0 answers
65 views

I need to read an excel file into R. I am using the following code: library(readxl) data <- read_excel("path/to/file.xlsx") The Excel file looks like this: I would like to read the file ...
Raga's user avatar
  • 426
1 vote
1 answer
186 views

I want to download the following link in R keeping the file name after browser download. http://www.coingecko.com/price_charts/export/1/usd.xls Notice that the file name will be 'btc-usd-max.xls' if ...
ffsffs's user avatar
  • 27
1 vote
2 answers
136 views

I have 96 different Excel files in a folder that all contain one single column, which looks approximately like this, whereby the uppermost line is the name of the Excel file: A1.xlsx Distance 245 534 ...
Hotshot's user avatar
  • 159
0 votes
1 answer
130 views

I'm trying to write a function that edits workbooks imported via loadWorkbook and have a problem where blank cells get ignored rather than treated as NAs. The following code demonstrates this issue. ...
js4032's user avatar
  • 402
0 votes
2 answers
122 views

I have a shiny app that I would wish to pass data frames from different Excel files depending on the choice from a selectInput. I tried to use observeEvent and if...else statements as shown in the ...
R noob's user avatar
  • 513
1 vote
1 answer
108 views

I'm looking for a way to automate some data clean-up. So far, I've figured out how to import several excel workbooks and all their sheets into R using the following: my_data = expand_grid( file = ...
Maria Hernandez's user avatar
0 votes
2 answers
299 views

I would like to hide a row in a dataframe that I am writing to Excel using the xlsx package, but can't find a way to do this. xlsx has the option of SheetName$setColumnHidden(index, TRUE) is there no ...
hdiza's user avatar
  • 43
4 votes
1 answer
1k views

Exp is a data frame , as given below: > Exp Branch Date Division 1 2 2023-02-10 820 2 2 2023-02-10 280 3 2 2023-02-10 935 4 2 2023-02-10 359 5 2 ...
Ray's user avatar
  • 361
0 votes
1 answer
131 views

I have raw data, output from a geochemical analysis, which contains a large number of observations for over 200 variables. The output of this analysis generates a number of columns containing many ...
Geoscientist_Pres's user avatar
1 vote
0 answers
449 views

I am currently working on an assignment that requires me to utilize the xlsx package in R. I have installed both "xlsx" and "rJava" packages, and have installed the most recent ...
JStark's user avatar
  • 11
0 votes
0 answers
163 views

When I try to install the package xlsx I get fatal error and R server session disconnected. It shows both the bomb with fatal error and server session diconnected even though I am just running it ...
Simon Chemnitz-Thomsen's user avatar
2 votes
1 answer
74 views

I have a dataset with greater than 20000 rows which I can't import into SharePoint due to its total number rows upload limitation to 20000. There are 17 columns and each of them have 6694 rows ...
Ed_Gravy's user avatar
  • 2,063
3 votes
0 answers
238 views

I'm making a shiny app with golem, which automatically makes it a package and for some background calculations that happen before the user does anything I'm loading in an excel file (just with xlsx's ...
PanikLIji's user avatar
1 vote
1 answer
7k views

I have the following code that works great when the header row is row 1 readerData(rawFile) { return new Promise((resolve, reject) => { const reader = new FileReader(); ...
Bill's user avatar
  • 1,517
2 votes
1 answer
52 views

I have been working with big though systematic data. Therefore I have wrote only shape of my data frame to below. I need to write every 3 column into different excel sheet. I tried some code and ...
Enes's user avatar
  • 33
5 votes
2 answers
8k views

I have been using Rstudio for a while and there was no problem until I was trying to install rJava and xlsx package in R. I had updated both my RGui and Rstudio to the latest version (also downloaded ...
Jedidiah Maatita's user avatar
0 votes
0 answers
251 views

I'm using R and i need to open an excel file, while i'm working with it it appears the next message: Error in .jcall("RJavaTools", "Z", "hasField", .jcast(x, "java/...
Fernando Marcelo Figueroa Carp's user avatar
2 votes
0 answers
307 views

I'm trying to import a dataset with .csv format but I keep getting errors. If I use the built-in import feature of R Studio I get this error: embedded nul in the string: 'C\0a\0m\0p\0a\0g\0n\0e\0_\0N\...
Andrea's user avatar
  • 115
0 votes
0 answers
55 views

I have a R code that uses joins from various tables and finally have an output dataframe. I need this to be appended to a new worksheet in excel file that already has three sheets in it. I am on a mac ...
moikoi's user avatar
  • 35
0 votes
1 answer
83 views

I am trying to create a formula in a cell of an existing Excel document. I can easily do it this way: #Load workbook wb<-loadWorkbook('test.xlsx') #Let this be any xlsx document with borders on ...
P.A's user avatar
  • 3
0 votes
2 answers
1k views

I have a lot of long Excel files and it is too hard to handle them manually. I'm reading them in R to identify the highlighted yellow cells as in the image The objective: is to loop over the days ...
Flore's user avatar
  • 97
0 votes
1 answer
408 views

I have a excel file which has multiple sheets embedded in it. My main goal is to basically remove all rows which are appearing multiple times in a single sheet and have to do this for every sheet. I ...
Manu's user avatar
  • 29
0 votes
2 answers
708 views

I have a dataframe of the following format: What i want to do is write it to a .xlsx file as below (everything in one sheet): Not fussed about the column names in the Excel file. Tried subsetting by ...
samsamara's user avatar
  • 4,760
0 votes
2 answers
2k views

I have an R script that saves its output into an Excel Workbook. library(stringr) library(dplyr) library(xlsx) ... write.xlsx(as.data.frame(df31), file='df31.xlsx', sheetName="Sheet1", col....
user3115933's user avatar
  • 4,493
1 vote
1 answer
140 views

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" ...
user3624032's user avatar
0 votes
1 answer
56 views

I download an xlxs file everyday with a long unique name with dates each day. I need R to read the new xlsx file saved in the directory everyday without typing the unique name everyday. My idea is to ...
doubleD's user avatar
  • 269
0 votes
1 answer
756 views

I'm currently using xlsx package to create and modify Excel files but I need to get rid of Java dependency. I've tried swapping the xlsx package for the openxlsx package but I can't find any simple ...
user avatar
0 votes
2 answers
54 views

I am attempting to export 3 dataframes to 3 different sheets in the same excel workbook, this is the code I used: write.xlsx(x = df1,file = "Report.xlsx",sheetName = "pr1") write....
user14750359's user avatar
0 votes
1 answer
825 views

I have created a merged cell in an excel file using the xlsx package in R. I'd like to write text in this merged cell and have tried the code below, however this leaves the cell blank, with no text ...
Harry's user avatar
  • 129
3 votes
2 answers
10k views

Although the xlsx package is installed, it does not work. I get the following error. What should I do? I use the latest version of R install.packages("xlsx") Installing package into ‘C:/...
Cgdmm's user avatar
  • 63
2 votes
2 answers
3k views

This can easily be done using for loop but I am looking for a solution with lapply or dplyr. I have multiple dataframes which I want to export to excel file in separate sheets (I saw many questions ...
Dayne's user avatar
  • 502
0 votes
0 answers
443 views

I'm trying to run a line of code in R with read.xlsx taken from xlsx package. it used to work fine but something has changed but I'm not sure what. df_sheet <- xlsx::read.xlsx(lane_info, ...
hamaor's user avatar
  • 41
1 vote
2 answers
1k views

I have a dataset with two different groups and their values, something like this: example <- data.frame('Group' = c('building 1', 'building 1', 'building 2', '...
enl's user avatar
  • 13
0 votes
1 answer
631 views

I'm trying to access an R script via an Excel file. That is, while I'm still in the Excel file, I'd like to run an R script, that fills that same Excel file. The reason for this is that Excel is not ...
Whizkid95's user avatar
  • 271
1 vote
1 answer
547 views

I am trying to read multiple excel files in a folder using the read.xlsx2 function. I only need to read a particular sheet titled 'Returns' or 'Prices'. Is there a way I can give an 'OR' argument in ...
FinRC's user avatar
  • 133
0 votes
1 answer
2k views

How can I export a data frame that has both English and Chinese words to a csv file? When I normally export it or even when I use a UTF-8 encoding to export the Chinese words are displayed as the ...
Ibo's user avatar
  • 4,319
0 votes
1 answer
681 views

I'm trying to write data from my for loop to excel file in a way that the data is in one sheet. I've been using the xlsx library but for some reason adding the APPEND = TRUE doesn't do the trick. An ...
Orion's user avatar
  • 65
0 votes
1 answer
271 views

Trying to export a file using write.xlsx() from package "xlsx". File export works as expected, however having trouble with the naming convention. I wish for the file to be names as follows: ...
jimiclapton's user avatar
-1 votes
2 answers
3k views

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 ...
user avatar
1 vote
0 answers
608 views

My mac system is macOS Catalina 10.15.1, and my R version is 3.6.1. When I try to install the rJava package on Rstudio using install.packages("rJava", type="source), it comes with error: make: *** [...
Wang Zhenzhong's user avatar
2 votes
1 answer
1k views

I write a dataframe in R to an excel file using the following command: write.xlsx(dataframe, pathName, row.names = FALSE, append = FALSE). Now I want to print the first row (headers in the dataframe)...
bml's user avatar
  • 125
1 vote
1 answer
846 views

Suppose I use the xlsx package to write a dataframe from r to excel. And suppose I have a dataframe with a column title that includes a question mark (code below): library(xlsx) rm(list = ls()) ...
Nana's user avatar
  • 13
1 vote
2 answers
35 views

I have a set of empty (0-row) and non-empty (>0-row) Tibbles in my global environment and I want to select only the relevant ones, i.e. the non-empty ones and send them to a write.xlsx command. It ...
Raberto's user avatar
  • 55
0 votes
1 answer
734 views

I am using rJava package in R on MacOS. This error happened: Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : java.lang.OutOfMemoryError: Java heap space I need rJava to ...
Hans Wang's user avatar
1 vote
0 answers
358 views

I'm using the "xlsx" package in R to read, modify and write a .xlsm file. I'm having some problems with border styling to my rows and columns: I'm adding a dataframe (df) into a sheet and I'm ...
user1987607's user avatar
  • 2,197
1 vote
1 answer
772 views

I have 15 tibbles that I want to export to a single XLSX workbook, with the sheetName for each set to be the same as the name of the tibble object. To export a single tibble, this works just fine: ...
Kevin Troy's user avatar
1 vote
0 answers
148 views

I'm looking for examples or ideas on how I might display a data table in a. Rmd document that has grouped totals at multiple levels. So, in the example following, the date, names, qty, rate, and value ...
sathish kumar's user avatar