发布于 2006-04-06 12:13:50
0楼
斑竹,新建Excel文件的那个脚本还有点问题,能帮我分析一下吗?谢谢
__object* nExcel;
__object* MyFile;
char str[30];
char fname[50];
time_t t1;
struct tm *t2;
time(&t1);
t2=localtime(&t1);
strftime(str,20,"%Y-%m-%d %H-%M",t2);
strcat(fname,"d:\\");
strcat(fname,str);
strcat(fname,".xls");
nExcel=__object_create("s cripting.FileSystemObject");
MyFile=nExcel->GetFile("d:\\book1.xls");
MyFile->Copy(fname);