在access建表,中选择文件-获取外部数据-导入(第一行包含列标题,excel文件第一行为字段名)。

解决方案 »

  1.   

    在access中执行这么一句vba就可以了
        DoCmd.TransferSpreadsheet acImport, 8, "sheet1", "F:\Documents and Settings\Administrator\My Documents\book1.xls", True, ""
    最后两个参数是:是否第一行是字段名,转换的范围(如A1:E26)。
    你可以通过server中的控件运行之
      

  2.   

    uses adodb,...
    ....
    with TAdoConnection.Create(self) do try
       connectionstring:='Provider=Microsoft.Jet.OLEDB.4.0;Data DataSource=aaa.mdb;'
       LoginPrompt:=false;
       execute('select * into aaa from [excel 8.0;database=d:\ccc.xls].aaa');
    finally
       free;
    end;