我是用到scExcelExport组件的,代码如下:if dlgSave1.Execute then begin try for i:=0 to dbgDy.DataSource.DataSet.FieldCount-1 do begin if dbgDy.DataSource.DataSet.Fields.DataType=ftDateTime then TDateTimeField(dbgDy.DataSource.DataSet.Fields).DisplayFormat:='yyyy-mm-dd'; end; scExcelExport1.LoadDefaultProperties; scExcelExport1.ExcelVisible:=False; scExcelExport1.Dataset:=dbgDy.DataSource.DataSet; // scExcelExport1.WorksheetName:='Orders3'; scExcelExport1.StyleColumnWidth := cwAutoFit; scExcelExport1.ExportDataset; scExcelExport1.SaveAs(dlgSave1.FileName,ffXLS); scExcelExport1.Disconnect; Application.MessageBox('输出到Excel完成!','系统提示',MB_OK+MB_ICONINFORMATION); except on E: Exception do begin scExcelExport1.Disconnect; Application.MessageBox(PChar('输出到Excel失败!' + #13 + E.Message), '警告', mb_ok + MB_ICONWARNING ) ; end; // Application.MessageBox('输出到Excel失败!','系统提示',MB_OK+MB_ICONWARNING); end; end;相同的数据,在我的开发电脑导出是没有问题的,在另外一台电脑导出就提示错误了