1

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.

dportman
  • 1,101
  • 10
  • 20

1 Answers1

0

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

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

Giovana Stein
  • 451
  • 3
  • 13
  • Thank you Giovana, the problem is not the "\" because if it were a csv file it works perfect, the problem is the format of the temp file = file155c162721e8 that is xls format – Gabriel Benitez Jun 22 '18 at 08:20