请问ExpressQuantumGrid4.5中怎样把数导出

hfrui 2003-08-22 05:45:50
3.X版的有SaveTo...现在没有了
...全文
51 6 打赏 收藏 转发到动态 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
dickeybird888 2003-11-07
  • 打赏
  • 举报
回复
学习学西!
MyFree9 2003-11-03
  • 打赏
  • 举报
回复
多谢 delphi0302(好好学习,天天向上!)。真是授人以渔。
我也想给您送100分。
overtime 2003-08-22
  • 打赏
  • 举报
回复
ExportGrid4ToExcel
delphi0302 2003-08-22
  • 打赏
  • 举报
回复
你去查它的help里边都有
delphi0302 2003-08-22
  • 打赏
  • 举报
回复
ExpressQuantumGrid4 allows you to export data to a number of formats. Currently HTML, XML, MS Excel and text formats are supported.
The HTML and XML formats are more complex since they can reflect most of grid features, such as styles, grouping and master-detail relationships. The MS Excel format does not support master-details because of the rigid column arrangement. When exporting to text format, only the data and its arrangement is exported. As for the MS Excel format, text format does not support exporting detail views.

Four methods allow you to export data to these formats:

?ExportGrid4ToHTML

?ExportGrid4ToXML

?ExportGrid4ToExcel

?ExportGrid4ToText

In addition to the cxExportGrid4Link unit, where these methods are declared, you should include the cxExport module into the uses statement.
delphi0302 2003-08-22
  • 打赏
  • 举报
回复
导出为excel

Exports the contents of a specified grid in MS Excel format.


Unit

cxExportGrid4Link


Declaration






procedure ExportGrid4ToExcel(const AFileName: string; AGrid: TcxGrid; AExpand: Boolean = True; ASaveAll: Boolean = True; AUseNativeFormat: Boolean = False);






Description

The ExportGrid4ToExcel method exports records from the AGrid control in MS Excel format. Note: ExportGrid4ToExcel is restricted to grids with a single level, i.e. it does not support exporting detail views. Detail views are ignored.
The AFileName parameter defines the name and the path of the output XLS file. Any extension specified in this parameter is replaced with ?xls?
The AExpand parameter indicates whether to export all records displayed in the grid including those hidden within collapsed groups. If this parameter value is False, only visible records are written to the file.

The ASaveAll parameter indicates whether to export selected or all records.
If the AUseNativeFormat parameter is True, when exporting currency, date and time fields, the format of corresponding Excel cells is set to Currency, Date and Time respectively. Otherwise, these fields are exported as simple text. Setting AUseNativeFormat to True prevents errors when you access these cells via MS Excel formulas and create charts.

1,183

社区成员

发帖
与我相关
我的任务
社区描述
Delphi GAME,图形处理/多媒体
社区管理员
  • GAME,图形处理/多媒体社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧