Gabriel Benitez
Gabriel Benitez

Reputation: 11

Reading Email Attachment .xls in R

I am using R to read attached files from Outlook. I've tried already these steps and they work perfectly Reading Email Attachment to R.

The problem is that my files are in a xls format so read.csv doesnt work.

I have this error:

data <- read.csv(attachment_file)

Warning message: In read.table(file = file, header = header, sep = sep, quote = quote, : incomplete final line found by readTableHeader on 'C:\Users\GABRIE~1.BEN\AppData\Local\Temp\RtmpWmxRwP\file155c162721e8'

When I tried to open it with read.excel function I get this error

data <- read_excel(attachment_file, sheet = 1) Error: Missing file extension.

Upvotes: 1

Views: 644

Answers (1)

Giovana Stein
Giovana Stein

Reputation: 459

You should use this "/" instead of this "\" in your file url.

Like this: 'C:/Users/GABRIE~1.BEN/......"

Upvotes: 0

Related Questions