DS2XL Class Library  

DS2XL.Export Method

Exports DataSet,  DataTable or DataView into the file using specified format.

Overload List

Exports DataSet  into the file using the specified xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataSet, String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataSet, string, xpOutputFormat, bool, bool);

Exports DataTable into the file using the specified xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataTable, String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataTable, string, xpOutputFormat, bool, bool);

Exports DataTable into the file using the specified list of columns and xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataTable, String(), String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataTable, string[], string, xpOutputFormat, bool, bool);

Exports DataSet  into the file using the specified list of columns and xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataSet, String(), String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataSet, string[], string, xpOutputFormat, bool, bool);

Exports DataSet  into the file using the specified list of tables with the columns and xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataSet, ExportTable(), String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataSet, ExportTable[], string, xpOutputFormat, bool, bool);

Exports DataView into the file using the specified xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataView, String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataView, string, xpOutputFormat, bool, bool);

Exports DataView  into the file using the specified list of columns and xpOutputFormat format value.

[Visual Basic] Overloads Public Sub Export(DataView, String(), String, xpOutputFormat, Boolean, Boolean)
[C#] public void Export(DataView, string[], string, xpOutputFormat, bool, bool);

Example

[Visual Basic] The following example exports DataTable to different Microsoft® Excel formats.

[C#] 
private void ExportDataTable(DataTable dataTableToExport, xpOutputFormat outputFormat) {

    VM.xPort.DS2XL xporter;

    xporter = new VM.xPort.DS2XL();

    //Export data 
    xporter.Export(dataTableToExport, "DataTableExport", outputFormat, true, true);

    MessageBox.Show("Export completed.");
}

[Visual Basic] 
Private Sub ExportDataTable(ByVal dataTableToExport As DataTable, ByVal outputFormat As xpOutputFormat)

    Dim xporter As VM.xPort.DS2XL

    xporter = New VM.xPort.DS2XL()

    'Export data 
    xporter.Export(dataTableToExport, "DataTableExportXls", outputFormat, True, True)

    MessageBox.Show("Export completed.")

End Sub

[C++, JScript] No example is available for C++ or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

See Also

DS2XL Class | DS2XL Members | VM.xPort Namespace