HomeCommunityControl GalleryManagement & Reporting .NET xPorter V 3.0.1000

.NET xPorter V 3.0.1000



Submit a Review

848 Downloads

16,300 Views


Description

xPort Tools for .NET.NET xPorter is 100% managed .NET component that provides extremely fast export of the data from ADO.NET DataSet/DataTable/DataView into the native Microsoft Excel, Microsoft Excel 2007 XLSX, Microsoft Excel XML, CSV or HTML formats without using Excel itself or any additional tools and providers. .NET xPorter provides fast and simple way to transfer your data with the minimum efforts.

Syntax Example

VB.NET (ASP.NET application) Private Sub SaveDataSetIntoBinaryExcel(ByVal loDataSet As DataSet) Dim loXPort As VM.xPort.DS2XL Dim lcExportFile As String Dim loFileInfo As FileInfo If Not loDataSet Is Nothing Then loXPort = New DS2XL() 'Generate temporary file name lcExportFile = System.IO.Path.GetTempFileName & ".xls" loXPort.Export(loDataSet, lcExportFile, xpOutputFormat.Excel8, True, True) loFileInfo = New FileInfo(lcExportFile) If loFileInfo.Exists AndAlso Response.IsClientConnected Then 'Write Excel content into the Response Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("Content-Disposition", "attachment; filename=" & lcExportFile) Response.WriteFile(lcExportFile) Response.Flush() End If End If End Sub VB.NET (Windows application) Private Sub SaveDataSetIntoBinaryExcel(ByVal loDataSet As DataSet) Dim loXPort As VM.xPort.DS2XL Try If Not loDataSet Is Nothing Then loXPort = New DS2XL() loXPort.Export(loDataSet, "Authors.xls", xpOutputFormat.Excel8, True, True) loXPort.Dispose() loXPort = Nothing End If MessageBox.Show("Export Completed!") Catch loEx As Exception MessageBox.Show(loEx.Message) End Try End Sub

Reviews

Submit a review