Data export is a very common task. The most acceptable format for users is Excel files. If other formats can be exported while exporting Excel files, users are more satisfied.
We currently provide a data export tool for the DataTable and DataGridView controls.
Component:IBeamMDAAWinUI. dll
Namespace:IBeam. MDAA. WinUI
Example:
Preview and export data:
String title = string. Format ("{0} Contact information", contactmechanic ismlist. PartyName );
Dgvcontactmechanic ismlist. Print (DataGridViewHelp. PaperType. A4 portrait, title );
Export an Excel file directly:
String title = string. Format ("{0} Contact information", contactmechanic ismlist. PartyName );
Dgvcontactmechanic ismlist. ExportToExcel (title, title );
Export PDF files directly:
String title = string. Format ("{0} Contact information", contactmechanic ismlist. PartyName );
Dgvcontactmechanic ismlist. ExportToPDF (DataGridViewHelp. PaperType. A4 portrait, title, title );
Export the file as a BMP file:
String title = string. format ("{0} Contact information", contactmechanic ismlist. partyName); dgvcontactmechanic ismlist. exportToImage (maid. paperType. a4 vertical, "BMP", title, title );
Export the file as a TIFF file:
String title = string. Format ("{0} Contact information", contactmechanic ismlist. PartyName );
Dgvcontactmechanic ismlist. ExportToImage (DataGridViewHelp. PaperType. A4 portrait, "TIFF", title, title );
Export the image as a JPEG file:
String title = string. format ("{0} Contact information", contactmechanic ismlist. partyName); dgvcontactmechanic ismlist. exportToImage (maid. paperType. a4 vertical, "JPEG", title, title );