con1: TADOConnection; var sFileName, sSql: string; begin sFileName := ExtractFilePath(Application.ExeName) + 'TextBook.xls'; con1.Connected := False; con1.ConnectionString := 'Provider=Microsoft.ACE.OLEDB.12.0;Password="";Data Source=' + sFileName + ';Extended Properties=Excel 12.0;Persist Security Info=True';; con1.Connected := True; sSql := 'create table Sheet1(姓名 TEXT)'; con1.Execute(sSql); con1.Connected := False; end; 如果是xlsx文件 Pvcon.ConnectionString:= 'Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties=Excel 12.0 Xml;Password="";Data Source=' + PvFileName + ';Persist Security Info=False';;