数据导入excel的问题? 能成功导入,可成功率很低,时好时坏,不知为什么?经常是什么RPC错误,关闭都关不掉。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 没遇到过,什么系统?在WIN98易出问题 try excelsysinfo.Connect; excelsysinfo.Visible[0]:=true; //excelsysinfo.Workbooks.Application;//('book1',0); excelsysinfo.Workbooks.Add(emptyparam,0); sheet:=excelsysinfo.Workbooks[1].Worksheets[1]; sheet.name:='系统日志'; cdsysinfo.First; sheet.cells[1,1]:='帐号'; sheet.cells[1,2]:='登录时间'; sheet.cells[1,3]:='退出时间'; sheet.cells[1,4]:='计算机名'; sheet.cells[1,5]:='使用模块'; for i:=1 to cdsysinfo.RecordCount do begin sheet.cells[i+1,1]:=cdsysinfo.FieldByName('userid').AsString; sheet.cells[i+1,2]:=datetimetostr(cdsysinfo.FieldByName('starttime').AsDateTime); sheet.cells[i+1,3]:=datetimetostr(cdsysinfo.FieldByName('endtime').AsDateTime); sheet.cells[i+1,4]:=cdsysinfo.FieldByName('computer').AsString; sheet.cells[i+1,5]:=cdsysinfo.FieldByName('usemodule').AsString; cdsysinfo.Next; end; except showmessage('未安装EXCEL或EXCEL有错误,不能打开!'); end; baolong530(baolong530):去问你妈,怎么只管生,不管教? Delphi操作excel 如何显示Memo控件的内容 用DELPHI如何实现进程隐藏,高手请进,在线急等 TMediaPlayer获取播放时间的问题 因为是新手在线求助 急急啊 200分 系统做好了.要写个程序把分离出来xxx.MDF和xxx.LDF导入到数据库中,怎么办? 请问:Infopower控件如何汉化?还有就是如何改InfoPower控件窗体的字体? 如何在两个程序之间传递参数? 高手关注:资源占用问题! 怎样把标题栏隐藏起来? 怎样声明一个公用全局的变量,函数? 分辨率问题
excelsysinfo.Connect;
excelsysinfo.Visible[0]:=true;
//excelsysinfo.Workbooks.Application;//('book1',0);
excelsysinfo.Workbooks.Add(emptyparam,0);
sheet:=excelsysinfo.Workbooks[1].Worksheets[1];
sheet.name:='系统日志';
cdsysinfo.First;
sheet.cells[1,1]:='帐号';
sheet.cells[1,2]:='登录时间';
sheet.cells[1,3]:='退出时间';
sheet.cells[1,4]:='计算机名';
sheet.cells[1,5]:='使用模块';
for i:=1 to cdsysinfo.RecordCount do
begin
sheet.cells[i+1,1]:=cdsysinfo.FieldByName('userid').AsString;
sheet.cells[i+1,2]:=datetimetostr(cdsysinfo.FieldByName('starttime').AsDateTime);
sheet.cells[i+1,3]:=datetimetostr(cdsysinfo.FieldByName('endtime').AsDateTime);
sheet.cells[i+1,4]:=cdsysinfo.FieldByName('computer').AsString;
sheet.cells[i+1,5]:=cdsysinfo.FieldByName('usemodule').AsString;
cdsysinfo.Next;
end;
except
showmessage('未安装EXCEL或EXCEL有错误,不能打开!');
end;