主题:如何将DELPHI模块查出来的数据右键发送到EXCEL
这是我的程序查询的语句,请问需要增加什么模块如何修改可以做到EXCEL导出,或用其它方法右键保存,请将控件名称写上,如何修改后的语句一起附上,谢谢!
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
adoquery1.Close;
adoquery1.SQL.Clear;
begin
adoquery1.SQL.Add('select goodscode 商品编码,goodsname 商品名称,latestinprice 进价,defsaleprice 售价 from gds_goodscode');
adoquery1.SQL.Add('group by goodscode,goodsname,latestinprice,defsaleprice');
adoquery1.Open;
end;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
close
end;
end.
procedure TForm1.BitBtn1Click(Sender: TObject);
begin
adoquery1.Close;
adoquery1.SQL.Clear;
begin
adoquery1.SQL.Add('select goodscode 商品编码,goodsname 商品名称,latestinprice 进价,defsaleprice 售价 from gds_goodscode');
adoquery1.SQL.Add('group by goodscode,goodsname,latestinprice,defsaleprice');
adoquery1.Open;
end;
end;
procedure TForm1.BitBtn2Click(Sender: TObject);
begin
close
end;
end.