【问题标题】:Reading Email Attachment .xls in R在 R 中读取电子邮件附件 .xls
【发布时间】:2018-06-21 17:04:24
【问题描述】:

我正在使用 R 从 Outlook 读取附件。我已经尝试过这些步骤,它们可以完美运行Reading Email Attachment to R

问题是我的文件是 xls 格式,所以 read.csv 不起作用。

我有这个错误:

data <- read.csv(attachment_file)

警告信息: 在 read.table(file = file, header = header, sep = sep, quote = quote, : readTableHeader 发现的最后一行不完整 'C:\Users\GABRIE~1.BEN\AppData\Local\Temp\RtmpWmxRwP\file155c162721e8'

当我尝试使用 read.excel 函数打开它时,我得到了这个错误

数据

【问题讨论】:

    标签: r email outlook


    【解决方案1】:

    您应该在文件 url 中使用这个“/”而不是这个“\”。

    像这样: 'C:/Users/GABRIE~1.BEN/......"

    【讨论】:

    • 谢谢 Giovana,问题不在于“\”,因为如果它是一个 csv 文件,它可以完美运行,问题是临时文件的格式 = file155c162721e8 是 xls 格式
    猜你喜欢
    • 2018-05-31
    • 2012-05-17
    • 1970-01-01
    • 1970-01-01
    • 2016-07-26
    • 1970-01-01
    • 2014-05-10
    • 1970-01-01
    • 2012-03-13
    相关资源
    最近更新 更多