0

我想使用 readxl 包从 excel 表中读取一些不连续的单元格。读入的数据应存储为向量。

我正在阅读的单元格是日期格式,我想保持这种格式。

我尝试了以下方法:

  startDate <- c(read_excel("G:/ai/My Courses/Course Distributions.xlsm", sheet = "Academic Calendar",  col_names = F, range = "c7"),
             read_excel("G:/ai/My Courses/Course Distributions.xlsm", sheet = "Academic Calendar", col_names = F, range = "d7"),
             read_excel("G:/ai/My Courses/Course Distributions.xlsm", sheet = "Academic Calendar", col_names = F, range = "e7"),
                 read_excel("G:/ai/My Courses/Course Distributions.xlsm", sheet = "Academic Calendar", col_names = F, range = "f7"))

我的结果是

> startDate 
$`X__1`
[1] "2018-01-15 UTC"

$X__1
[1] "2018-08-30 UTC"

$X__1
[1] "2018-10-15 UTC"

$X__1
[1] "2018-11-15 UTC"

我怎样才能得到一个向量的结果?

4

0 回答 0