udf_async_rbind <- function(path= "D:/R/oper_key_index/data/d_data/",
name= "移网线上单" ,
Date_temp = format(Date_stemp,"%Y%m%d"), # 直接引用变量不执行,需加函数转为常量
Date_last_month_day = ymd("2021-08-31") , # 函数内变量名不要与外部变量名重复
Date_last_month_day1= ymd("2021-07-31") ,
cols=190 ){
x <- udf_DT(paste0(path,name,Date_temp,".xlsx") , 1 ,0)
y <- udf_DT(paste0(path,name,format(Date_last_month_day,"%Y%m%d"),".xlsx"),1,0)
z <- udf_DT(paste0(path,name,format(Date_last_month_day1,"%Y%m%d"),".xlsx"),1,0)
if(ncol(x)>70){
x <- x[,1:cols]
y <- y[,1:cols]
z <- z[,1:cols]}else{print("全列导入")}
setnames(y,names(x))
table <- rbind(x, y)
return(table)
}
mob_dev_2ilist <- udf_async_rbind( name = "移网线上单" )