日报表日历脚本
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
日报表日历脚本
float A year;
float Amonth;
float Aday;
long x;
long y;
long Row;
long StartTime;
string temp;
A year=ADate.Y ear;
Amonth=ADate.Month;
Aday=ADate.Day;
temp=StrFromInt( A year, 10 );
if(Amonth<10)
temp=temp+"-0"+StrFromInt( Amonth, 10 );
else
temp=temp+"-"+StrFromInt( Amonth, 10 );
if(Aday<10)
temp=temp+"-0"+StrFromInt( Aday, 10 );
else
temp=temp+"-"+StrFromInt( Aday, 10 );
\\本站点\选择日期=temp;
ReportSetCellString2("Report4", 4, 1, 27, 6, " "); //清空单元格ReportSetCellString("Report4", 2, 2, temp);//填写日期
StartTime=HTConvertTime(A year,Amonth,Aday,0,0,0); ReportSetHistData("Report4", "\\本站点\V1", StartTime, 3600, "B4:B27"); ReportSetHistData("Report4", "\\本站点\V2", StartTime, 3600, "C4:C27"); ReportSetHistData("Report4", "\\本站点\A1", StartTime, 3600, "D4:D27"); ReportSetHistData("Report4", "\\本站点\A2", StartTime, 3600, "E4:E27"); ReportSetHistData("Report4", "\\本站点\油温", StartTime, 3600, "F4:F27"); x=0;
while(x<24)
{
row=4+x;
y=StartTime+x*3600;
temp=StrFromTime( y, 2 );
ReportSetCellString("Report4", row, 1, temp);
x=x+1;
}
保存
string filename;
filename=InfoAppDir()+\\本站点\选择日期+".xls";
ReportSaveAs("report4","D:\电除尘器")