把数据导出成DBF,再用TExcel调用DBF,再另存为xls文件即可
解决方案 »
- 在oracle企业管理台上无法输入日期?
- oracle 新建定期执行的作业需要什么权限?
- alter session set current_schema 是什么意思
- @@@求能够将中文名字转为拼音的方法@@@
- 出现“oracle management server 服务启动后又停止了,一些服务自动停止,如果他们没什么可做的“
- execute(sql)里的sql文结尾为什么有的要分号有的不要?
- concat
- oracle从文件导入数据时出现1950错误如何解决
- Oracle中Char类型作为连接字段的问题
- 怎么将整型转成long型?(新手,请多多指教)
- 难题,这样的数据库连接怎么个配法?
- 这个问题让我有点头痛
procedure TForm1.BitBtn1Click(Sender: TObject);
var MSExcel: Variant;
i, j,VL_I: Integer;
filename: string;
F: TextFile;
begin
if OpenDialog1.Execute then
begin
filename := OpenDialog1.FileName; { Read the first line out of the file }
end;
//从Excel文件里读取信息
MSExcel := CreateOLEObject('Excel.Application');
MSExcel.WorkBooks.Open(filename); //从有数据的行逐行读入数据<br>
for i := 1 to ClientDataSet1.RecordCount do
begin
for j := 1 to ClientDataSet1.FieldCount - 1 do
MSExcel.Cells[i, j].value := ClientDataSet1.Fields[j-1].AsString;
end;
MSExcel.Visible :=true;end;