16,748
社区成员
发帖
与我相关
我的任务
分享
for ExcelSheet_Count:=ExcelSheet_Count-4 to StrToInt(FormatDateTime('dd',Now()) ) do
begin
day := IntToStr(ExcelSheet_Count);
DReportPath :='\\P4-AK2-MONITOR\Shared Date\NOX GEN2&GEN3\oee daily report\'+year+'-'+month+'-'+day+' ckfe nox gen 2&3 oee report.xls' ;
ExcelDReport := ExcelApp2.WorkBooks.Open(DReportPath);
ExcelSheet1 := ExcelBook.WorkSheets[ExcelSheet_Count+4];
ExcelSheet2 := ExcelDReport.WorkSheets[1];
ExcelSheet1.Activate;
ExcelSheet2.Activate;
myrange2:=ExcelSheet2.Range['C6','Q20'];
myrange2.select;
myrange2.copy;
myrange1:=ExcelSheet1.Range['C4','Q18'];
myrange1.select;
ExcelSheet1.paste;
myrange1.NumberFormatLocal:='0%'; //没有效果,why?
end;