以下是我的程序源码:1、程序运行到 Xls_RowCount:=EclApp.activesheet.usedrange.rows.Count();   
提示:“找不到成员”。2、如果将行数有常量代替Xls_RowCount:=100,程序可以继续运行。但在最终提示“导入数据失败”3、如果将以下几段放到循环外,程序可以运行,但dzsb表中只有一条记录,就是Excel表中的最后一条记录,既第100条。
            with AdoTable1 do
               begin
                 Close;
                 Active:=true ;
                 Append ;
               end;             adotable1.Post ;
             adotable1.Refresh;------------------------------------
procedure TFormMain.RzButton1Click(Sender: TObject);
var
  EclApp,WorkBook :variant;
  Xls_rowCount :integer;      // excel 文件的行数
  i :integer;
begin
  try
    EclApp:=CreateOLEObject('Excel.Application');
    WorkBook:=CreateOleObject('Excel.Sheet');
  except
    showmessage('您系统未安装MS-EXCEL');
    exit;
  end;  try
    if OpenDialog1.Execute then
    begin
     workBook := EclApp.WorkBooks.Add;
     EclApp.workBooks.open(OpenDialog1.FileName);
    end;
  except
    on EOleException do
      begin
        WorkBook.close;
        EclApp.quit;
        EclApp:=Unassigned;
        Exit;
      end
   end;  EclApp.Visible :=false;  Xls_RowCount:=EclApp.activesheet.usedrange.rows.Count();   //返回Excel行数
//  Xls_RowCount:=100;
  self.suiProgressBar1.max:=Xls_RowCount;
    if Xls_RowCount<>1 then begin
      try
           self.suiProgressBar1.Position:=self.suiProgressBar1.Position+1;
         for i :=2 to Xls_RowCount do
           begin
             with AdoTable1 do
               begin
                 Close;
                 Active:=true ;
                 Append ;
               end;
             self.suiProgressBar1.Position:=self.suiProgressBar1.Position+1;             adotable1.FieldValues ['zcbm']:= EclApp.activesheet.cells.item[i,1];
             adotable1.FieldValues['zcmc']:= EclApp.activesheet.cells.item[i,2];
             adotable1.FieldValues['ejfl']:= EclApp.activesheet.cells.item[i,3];
             adotable1.FieldValues['pp']:= EclApp.activesheet.cells.item[i,4];
             adotable1.FieldValues['xh']:= EclApp.activesheet.cells.item[i,5];
             adotable1.Post ;
             adotable1.Refresh;
          end;
         showmessage('导入数据成功');
       except
         showmessage('导入数据失败');
         WorkBook.close;
         EclApp.quit;
         EclApp:=Unassigned;
         adotable1.Close;
      end;
 end;
 end;
end.