待完善補充例子git
library(readxl) # library(readr) library(lubridate) #日期處理 library(dplyr) # library(stringr) #字符串處理 library(openxlsx)
https://github.com/awalker89/openxlsxgithub
b$Time時間 <- format(b$Time時間,"%H:%M") [1] "04:47" "23:45" NA "00:00" as.POSIXct("2015/08/18 09:50") [1] "2015-08-18 09:50:00 CST"
write a list of data.frames to individual worksheets using list names as worksheet namescode
l <- list("IRIS" = iris, "MTCARS" = mtcars) write.xlsx(l, file = "writeXLSX2.xlsx") write.xlsx(l, file = "writeXLSXTable2.xlsx", asTable = TRUE)