关于DELPHI中DBGRID的数据导出到EXCEL!(50分)

  • 主题发起人 主题发起人 rose123
  • 开始时间 开始时间
R

rose123

Unregistered / Unconfirmed
GUEST, unregistred user!
关于DELPHI中DBGRID的数据导出到EXCEL!请帮个忙,俺一定感激涕零.
 
很麻烦的,你如果十分急,可以把你的mail给我,我给你发个。
 
procedure DataToExcel(Grid:TDbGrid;DataSet:TDataset;Title:String;sExcelFile:String);
var
 
 
i,j,Row:integer;
 
 
WB: _WorkBook;
WBs: Workbooks;
FExcelWasFound:Boolean;
ExcelFile:string;
FileHandle: integer;
irange:range;
iWidth:integer;
//oFont:olevariant;
begin
try
Screen.Cursor :=crHourGlass ;
{for i:=0 to Grid.Columns.Count -1do
begin
Dataset.Fields.DisplayWidth :=Grid.Columns.Width;
end;
}
ExcelFile:=sExcelFile;
if not fileExists(ExcelFile) then
begin
FileHandle:=FileCreate(ExcelFile);
Fileclose(FileHandle);
end;
FExcelWasFound := True;
try
FApp := CreateOleObject('Excel.Application.9') as _Application; 
//调用Excel2000
 
except
 
 
FExcelWasFound := False;
 
end;
 
if not FExcelWasFound then
 
 
 
 
 
 
 
 
 
//如果不存在,则调用Excel97
 
 
try
 
 
 
FApp := CreateOleObject('Excel.Application.8') as _Application;
 
 
 
FExcelWasFound := True;
 
 
except
 
 
 
FExcelWasFound := False;
 
 
 
ShowMessage('Excel调用失败!');
 
 
end;
 
if FExcelWasFound then
 
begin
 
 
InitVariables;
 
 
New(FSPms);
 
 
with FApp ,FSPms^do
 
 
begin
 
 
 
App_SheetsInNewWorkbook := Get_SheetsInNewWorkbook(0);
 
 
 
App_DisplayFormulaBar := Get_DisplayFormulaBar(0);
 
 
 
App_ReferenceStyle := Get_ReferenceStyle(0);
 
 
 
App_DisplayStatusBar := Get_DisplayStatusBar(0);
 
 
 
Set_SheetsInNewWorkbook(0, 1);
 
 
 
WBs := Get_Workbooks; 
 
 
 
 
 
 
 
//打开Excel文件
 
 
 
WB := WBs.Open(excelFile, 3, false, 1,
 
 
 
 
'', '', True, $00000002, 1, False,
 
 
 
 
 
False, Null, False, 0);
 
 
 
MakeVBScript(WB); 
 
 
 
 
 
 
//初始化文件属性
 
 
end;
 
 
with FAppdo
 
 
begin
 
 
 
Set_DisplayFormulaBar(0, False);
 
 
 
Set_ReferenceStyle(0, Integer(xlR1C1));
 
 
 
Set_DisplayStatusBar(0, False);
 
 
 
Set_Caption(Title);
 
 
end;
 
 
try
 
 
Row:=1;
 
 
irange:=Fapp.ActiveCell ;
 
 
irange.Font.Size :=9;
 
 
for j:=0 to Grid.FieldCount -1do
 
 
begin
 
 
if Grid.Columns[j].Visible =true then
begin
if DataSet.Fields[j].displaywidth>254 then
iRange.ColumnWidth:=100
else
begin
//iWidth:=Grid.Columns[j].Width;
iRange.ColumnWidth :=Grid.Columns[j].Field.DisplayWidth ;
end;
irange.Font.Size :=9;
//ljq 2001/03/09
irange.value:=Grid.Columns[j].Title.Caption 
;
 
 
 
 
irange:=irange.Next;
 
 
 
end;
 
 
end;
 
 
except
 
 
 
ShowMessage('调用Excel出错!');
 
 
 
fApp._Release;
 
 
 
Screen.Cursor :=crDefault ;
 
 
 
exit;
 
 
end;
 
 
Row:=Row+2;
 
 
DataSet.DisableControls;
 
 
DataSet.First;
FApp.Get_ActiveWindow.DisplayZeros := True;
irange.NumberFormat:=10;
for i:=0 to DataSet.RecordCount -1do
begin
irange:=Fapp.Range['A'+IntToStr(Row),'A'+intToStr(Row)];
for j:=0 to Grid.FieldCount -1do
begin
if Grid.Columns[j].Visible =True then
begin
if Grid<>nil then
begin
iRange.Font.Size :=Grid.Font.Size;
iRange.Font.Name :=Grid.Font.Name;
end
else
begin
irange.Font.Size :=FFontSize;
irange.Font.Name :=FFontName;
end;
//edit by ljq 2001/03/09
iRange.Value :=Grid.Columns[j].Field.AsString ;
irange:=iRange.Next ;
end;
end;
DataSet.next;
Row:=Row+1;
&amp;nbsp;
&amp;nbsp;
end;
&amp;nbsp;
&amp;nbsp;
Screen.Cursor :=crDefault ;
&amp;nbsp;
&amp;nbsp;
DataSet.EnableControls;
&amp;nbsp;
&amp;nbsp;
irange:=FApp.Range['A1','K'+intToStr(Row-1)];
&amp;nbsp;
&amp;nbsp;
FApp.Set_Visible(0,True);
&amp;nbsp;
&amp;nbsp;
CreateToolBar(False);&amp;nbsp;
&amp;nbsp;
&amp;nbsp;
//屏蔽Excel的系统菜单,采用自定义菜单实现
&amp;nbsp;
end else
&amp;nbsp;
begin
&amp;nbsp;
&amp;nbsp;
ShowMessage('调用Excel2000或Excel97失败,请确认是否安装!'+#13#13+' 如果未安装,请先安装office');
&amp;nbsp;
&amp;nbsp;
Screen.Cursor :=crDefault ;
&amp;nbsp;
end;
&amp;nbsp;
except
&amp;nbsp;
&amp;nbsp;
ShowMessage('调用Excel出错!');
&amp;nbsp;
&amp;nbsp;
fApp._Release;
&amp;nbsp;
&amp;nbsp;
Screen.Cursor :=crDefault ;
&amp;nbsp;
&amp;nbsp;
exit;
&amp;nbsp;
end;
end;
 
直接写一个两重循环的建立一个execapplication,ExcelWorksheet然后添加数据!
 
哎,昨天我刚刚回答了一个同样的问题,也罢,再贴一次!
我是把数据库的数据导到EXCEL上,你适当变通一下,别忘记拿分来:))
procedure TrepForm.doit;
var
i,j,k1,k2,kkkk:integer;
memolist:tstringlist;
s_dj,s_zj:string;
tot:real;
begin
tot:=0;
try
MsExcel:=CreateOleObject('Excel.Application');
MsExcelWorkBook:=MsExcel.WorkBooks.Add;
MsExcelWorkSheet:=MsExcel.Sheets['Sheet1'];
except
showerror('无法打开 EXCEL 97');
exit;
end;
memolist:=tstringlist.Create;
MsExcel.Visible:=True;
MsExcelWorkSheet.Range['A2:E2'].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=3;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A2:E2'].value:='采购合同';
kkkk:=4;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='合同号码:'+maintable.fieldbyname('ht_id').asstring;
memolist.assign(maintable.fieldbyname('bftt'));
if memolist.count=0 then
memolist.add(maintable.fieldbyname('wfgs').asstring);
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].value:='买方:'+memolist.strings[0];
for i:=1 to (memolist.count-1)do
begin
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':B'+inttostr(kkkk+i)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':B'+inttostr(kkkk+i)].value:=kong(7)+memolist.strings;
end;
kkkk:=kkkk+memolist.count;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='合同日期:'+maintable.fieldbyname('dateis').asstring;
memolist.assign(maintable.fieldbyname('ttr'));
if memolist.count=0 then
memolist.add(maintable.fieldbyname('supplier').asstring);
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].value:='卖方:'+memolist.strings[0];
for i:=1 to (memolist.count-1)do
begin
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':B'+inttostr(kkkk+i)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':B'+inttostr(kkkk+i)].value:=kong(8)+memolist.strings;
end;
kkkk:=kkkk+memolist.count;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':B'+inttostr(kkkk)].value:='签约地点:'+maintable.fieldbyname('qddd').asstring;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='交货日期:'+maintable.fieldbyname('jhdate').asstring;
kkkk:=kkkk+2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='一、品名、规格、数量、金额:';
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)].Value:='货号';
MsExcelWorkSheet.Range['A'+inttostr(kkkk)].select;
MsExcel.selection.columnwidth:=15;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['B'+inttostr(kkkk)].Value:='品质说明';
MsExcelWorkSheet.Range['B'+inttostr(kkkk)].select;
MsExcel.selection.columnwidth:=30;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk)].Value:='数量';
MsExcelWorkSheet.Range['C'+inttostr(kkkk)].select;
MsExcel.selection.columnwidth:=10;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['D'+inttostr(kkkk)].Value:='单价';
MsExcelWorkSheet.Range['D'+inttostr(kkkk)].select;
MsExcel.selection.columnwidth:=12;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['E'+inttostr(kkkk)].Value:='总价';
MsExcelWorkSheet.Range['E'+inttostr(kkkk)].select;
MsExcel.selection.columnwidth:=10;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':'+'E'+inttostr(kkkk)].select;
msexcel.selection.Borders[7].LineStyle:=1;//left
msexcel.selection.Borders[8].LineStyle:=1;//top
msexcel.selection.Borders[9].LineStyle:=1;//bottom
msexcel.selection.Borders[10].LineStyle:=1;//right
msexcel.selection.Borders[11].LineStyle:=1;//内部垂直
if qtsql.active then
qtsql.close;
qtsql.sql.clear;
qtsql.sql.Add('select * from nxhtsheet99');
qtsql.sql.Add('where ht_id='+''''+maintable.fieldbyname('ht_id').asstring+'''');
qtsql.open;
qtsql.first;
j:=1;
while qtsql.eof=falsedo
begin
memolist.Assign(qtsql.fieldbyname('shm'));
if memolist.count=0 then
memolist.add('');
s_dj:=maintable.fieldbyname('hbdm').asstring+qtsql.fieldbyname('unite_price').asstring+'/'+qtsql.fieldbyname('dw1').asstring;
s_zj:=maintable.fieldbyname('hbdm').asstring+format('%.2f',[qtsql.fieldbyname('unite_price').asfloat*qtsql.fieldbyname('pcs').asfloat]);
tot:=tot+qtsql.fieldbyname('unite_price').asfloat*qtsql.fieldbyname('pcs').asfloat;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+j)].Value:=qtsql.fieldbyname('product_id').asstring;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['B'+inttostr(kkkk+j)].Value:=memolist.strings[0];
MsExcelWorkSheet.Range['B'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk+j)].Value:=qtsql.fieldbyname('pcs').asstring+qtsql.fieldbyname('dw1').asstring;
MsExcelWorkSheet.Range['C'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['D'+inttostr(kkkk+j)].Value:=s_dj;
MsExcelWorkSheet.Range['D'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['E'+inttostr(kkkk+j)].Value:=s_zj;
MsExcelWorkSheet.Range['E'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
k1:=j;
for i:=1 to (memolist.count-1)do
begin
j:=j+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+j)].Value:='';
MsExcelWorkSheet.Range['A'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['B'+inttostr(kkkk+j)].Value:=memolist.strings;
MsExcelWorkSheet.Range['B'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['C'+inttostr(kkkk+j)].Value:='';
MsExcelWorkSheet.Range['C'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['D'+inttostr(kkkk+j)].Value:='';
MsExcelWorkSheet.Range['D'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcelWorkSheet.Range['E'+inttostr(kkkk+j)].Value:='';
MsExcelWorkSheet.Range['E'+inttostr(kkkk+j)].select;
MsExcel.Selection.HorizontalAlignment:=2;
end;
k2:=j;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+k1)+':A'+inttostr(kkkk+k2)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=1;
// MsExcelWorkSheet.Range['B'+inttostr(kkkk+k1)+':B'+inttostr(kkkk+k2)].select;
// MsExcel.Selection.merge;
MsExcelWorkSheet.Range['C'+inttostr(kkkk+k1)+':C'+inttostr(kkkk+k2)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=1;
MsExcelWorkSheet.Range['D'+inttostr(kkkk+k1)+':D'+inttostr(kkkk+k2)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=1;
MsExcelWorkSheet.Range['E'+inttostr(kkkk+k1)+':E'+inttostr(kkkk+k2)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+k1)+':E'+inttostr(kkkk+k2)].select;
msexcel.selection.Borders[7].LineStyle:=1;//left
msexcel.selection.Borders[8].LineStyle:=1;//top
msexcel.selection.Borders[9].LineStyle:=1;//bottom
msexcel.selection.Borders[10].LineStyle:=1;//right
msexcel.selection.Borders[11].LineStyle:=1;//内部垂直
j:=j+1;
qtsql.next;
end;
kkkk:=kkkk+j;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':D'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=4;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':D'+inttostr(kkkk)].value:='金额合计:';
MsExcelWorkSheet.Range['E'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['E'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:=maintable.fieldbyname('hbdm').asstring+format('%.2f',[tot]);
kkkk:=kkkk+2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='二、质量技术标准:'+maintable.fieldbyname('zlyq').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='三、交货地点:'+maintable.fieldbyname('fhyq').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='四、包装要求:'+maintable.fieldbyname('bzyq').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='五、质量检验:'+maintable.fieldbyname('jfcl').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='六、结算方式:'+maintable.fieldbyname('jsfs').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='七、运输要求:'+maintable.fieldbyname('ysfs').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='八、损耗计算:'+maintable.fieldbyname('shjs').asstring;
kkkk:=kkkk+1;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='九、配件供应:'+maintable.fieldbyname('pjgy').asstring;
memolist.assign(maintable.fieldbyname('memo'));
if memolist.count=0 then
memolist.add('');
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk)+':E'+inttostr(kkkk)].value:='十、合同备注:'+memolist.strings[0];
for i:=1 to (memolist.count-1)do
begin
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':E'+inttostr(kkkk+i)].select;
MsExcel.Selection.merge;
MsExcel.Selection.HorizontalAlignment:=2;
MsExcel.Selection.VerticalAlignment:=2;
MsExcelWorkSheet.Range['A'+inttostr(kkkk+i)+':E'+inttostr(kkkk+i)].value:=kong(19)+memolist.strings;
end;
memolist.free;
end;
 
to bbs_delphi
我也要類似的控件,如有的話給我也發一個,感激不盡力!!!
我現在分數不多以后給你行嗎
我的e_mail 002670@163.com
 
有一个专门导出为EXCEL控件,不过不好用,只是简单的导出数据表里的数据
无法按想要的格式来导出,所以自己写还是比较好的
 
多人接受答案了。
 
后退
顶部