Questions tagged [readxl]

an R package that can be used to import Excel (.xls and .xlsx) files into R

The readxl package can be used to import Excel (.xls and .xlsx) files into R. It has no external dependencies (the libxls C library is embedded) and works on Windows, Mac, and Linux.

Resources

257 questions
0
votes
1 answer

Error in readxl::read_excel: is_null(n) : object 'rlang_is_null' not found

When trying to run the sample code given here: xlsx_example <- readxl_example("datasets.xlsx") read_excel(xlsx_example) I get the error Error in is_null(n) : object 'rlang_is_null' not found Info about my R session: sessionInfo() R version 3.4.2…
Valentin
  • 4,666
  • 1
  • 33
  • 54
0
votes
0 answers

R file won't knit, saying readxl package doesn't exist

I'm using RStudio, and trying to knit my file to hand in my assignment. I installed the package "readxl" to read in a couple of excel files, and it worked fine in the actual coding of the assignment. But when I go to knit the file, I keep getting…
user8834671
  • 1
  • 1
  • 1
0
votes
1 answer

Reading the second excel tabs from multiple Excel workbooks in R

I have troubles with reading data stored in the 2nd tab of multiple Excel spreadsheets which are stored locally. I succeeded to read all the data from the first tab of these spreadsheets using the syntax: library(readxl) filenames2017…
0
votes
1 answer

read_excel error: Error in read_fun(path = path, sheet = sheet, limits = limits, shim = shim, : std::bad_alloc

I'm trying to read in some very messy xls workbooks. The workbooks contain merged cells, hidden rows/columns, grouped rows/columns, and macro buttons. I have been able to read in other sheets from the same set of workbooks but there is a series of…
0
votes
0 answers

R import excel with readxl package bug

The problem which I faced: all huge numbers during process of import by readxl converting to "-2147483648". Examples of my "huge" numbers: 45000000000,55000000000. Converting to text in Excel didn't help, defining col_types as "text" either. Is any…
0
votes
1 answer

How to design a function to read multi excel files and make a repetition calculation in R

I have a file contain a multi excel sheet, I want to run a function to read every sheet and subtract one column from another, then calculate a mean I tried library(readxl) average_working_hours <- function(Name) { Name <-…
0
votes
1 answer

Selecting odds/even rows only in R using readxl

My data are as follows: id name age 1 a 45 2 b 47 3 a 49 4 b 51 5 a 53 6 b 55 7 a 57 8 b 59 9 a 61 In order to extract only the odds rows, I tried the following…
Patrick
  • 569
  • 2
  • 12
0
votes
2 answers

Dataframes are created but column names are not changing when reading from excel workbook

I am trying to read an excel workbook in R and for each sheet will create a dataframe. In the next step, i want to read that created dataframe and use sheet name along with under score before each of the column in the respective dataframe. Here is…
Madhu Sareen
  • 489
  • 7
  • 19
0
votes
0 answers

Readxl function unable to detect the datatype and giving warnings after forced load

This is the my code. I have an xlsx file with multiple worksheets and I am trying to load the first worksheet. I used the RStudio Excel IDE to load the worksheet Rstudio Excel IDE Which generated the below code but it considered all the attributes…
shafeeq rahaman
  • 317
  • 1
  • 3
  • 14
0
votes
2 answers

Renaming a variable number of dataframes from a single object in R

I am trying to understand how to write a loop in R to rename a variable number of data frames. If I run this code: library("readxl") path <- readxl_example("datasets.xls") MyObject<-lapply(excel_sheets(path), read_excel, path = path) I get an…
Lina Bird
  • 411
  • 1
  • 6
  • 11
0
votes
2 answers

How to read multiple .xls files in r?

I have 18 files(.xls) in list and I want to read them in one go Here is my codes below: filenames=list.files("C:/Users/ozgur.alptekin/Downloads/elif") df.list=lapply(filenames, function(x) read_excel(file = x,sheetIndex = 1,as.data.frame =…
Ozgur Alptekın
  • 405
  • 6
  • 14
0
votes
0 answers

R: Iterate through excel file content readxl

require("readxl") excelFile<-read_excel("C:/PathtoExcel.xlsx") I want to iterate through the excelFile so I get each column's value in each row in the excel sheet how do I do that? I want to do that for following problem: I have an excel sheet with…
hariszaman
  • 7,457
  • 2
  • 35
  • 53
0
votes
1 answer

Import data with format

I have a question about import multiple data(excel or csv). I know if I want to read multiple excel data(same column name) at the same time, the code is: library(readxl) file.list <- dir(path = "/path", pattern='\\.xlsx', full.names = T) df.list…
Peter Chen
  • 1,270
  • 2
  • 13
  • 35
0
votes
1 answer

How to convert untidy survey tables to dataframes in R

I often work with survey data at my job that comes in horribly formatted excel files that have been designed for readability and not for any data analysis. I'm looking for a way to clean the data in R and knock it into a dataframe format of…
Paul Campbell
  • 691
  • 4
  • 8
0
votes
1 answer

Missing column when using read_excel to read from .xls file

I am using the R version 3.3.2 and latest readxl package. I am using the read_excel from readxl package for reading the .xls and .xlsx files. In Rstudio server the readxl reads the .xls and .xlsx files correctly. After deploying the application on…
Abhinandan Satpute
  • 2,140
  • 4
  • 23
  • 38