| | |
converting data in a table into csv (comma separated) file
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Sep 2006
Posts: 12
Reputation:
Solved Threads: 1
Hi , can u help with a code to convert to get a data set
& convert the values in a table to .csv file which can be viewed in a Excel sheet
how to create an .csv (comma separated) file using an VB.net programming
ie
converting data in a table into csv (comma separated) file
the by getting a data set & converting the values in a table into a .csv file using an VB.net coding
& convert the values in a table to .csv file which can be viewed in a Excel sheet
how to create an .csv (comma separated) file using an VB.net programming
ie
converting data in a table into csv (comma separated) file
the by getting a data set & converting the values in a table into a .csv file using an VB.net coding
•
•
Join Date: Jan 2007
Posts: 5
Reputation:
Solved Threads: 0
•
•
•
•
Hi , can u help with a code to convert to get a data set
& convert the values in a table to .csv file which can be viewed in a Excel sheet
how to create an .csv (comma separated) file using an VB.net programming
ie
converting data in a table into csv (comma separated) file
the by getting a data set & converting the values in a table into a .csv file using an VB.net coding
EXPORT TO EXCEL:
private void btnExport2_Click(object sender, System.EventArgs e)
{
// Export the details of specified columns
try
{
// Get the datatable to export
DataTable dtEmployee = ((DataSet)
Session["dsEmployee"]).Tables["Employee"].Copy();
// Specify the column list to export
int[] iColumns = {1,2,3,5,6};
// Export the details of specified columns to Excel
RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Web");
objExport.ExportDetails(dtEmployee,
iColumns, Export.ExportFormat.Excel, "EmployeesInfo2.xls");
}
catch(Exception Ex)
{
lblError.Text = Ex.Message;
}
}
EXPORT TO CSV
<PRE lang=cs id=pre1 style="MARGIN-TOP: 0px" nd="77">private void btnExportCSV_Click(object sender, System.EventArgs e)
{
// Export the details of specified columns
try
{
lblMessage.Text = "";
// Get the datatable to export
DataTable dtEmployee = dsEmployee.Tables["Employee"].Copy();
// Specify the column list to export
int[] iColumns = {1,2,3,5,6};
// Export the details of specified columns to CSV
RKLib.ExportData.Export objExport = new RKLib.ExportData.Export("Win");
objExport.ExportDetails(dtEmployee,
iColumns, Export.ExportFormat.CSV, "C:\\EmployeesInfo.csv");
lblMessage.Text = "Successfully exported to C:\\EmployeesInfo.csv";
}
catch(Exception Ex)
{
lblMessage.Text = Ex.Message;
}
}
</PRE>
refer this URL:
http://www.codeproject.com/aspnet/Ex...assLibrary.asp
regards,
Ammar.
![]() |
Similar Threads
- How to Update a Data Table? (ASP.NET)
- help........... (VB.NET)
- SQL Query to populate the data from Table to Forms (MS Access and FileMaker Pro)
- Reading Excel File using JAVA (Java)
- Convert fixed width text file to .csv (Java)
- Reading CSV in VC++ (C++)
- Error trying to write to existing file (C)
Other Threads in the VB.NET Forum
- Previous Thread: Wake-On LAN to Boot Remote PCs
- Next Thread: File Download
| Thread Tools | Search this Thread |
Tag cloud for VB.NET
.net .net2008 2008 access advanced application array basic beginner browser button buttons center click client code combo convert cuesent data database datagrid datagridview date datetimepicker designer dissertation dissertations dissertationtopic eclipse excel exists fade filter forms function html images input lib listview map mobile module msaccess net number objects open panel pdf picturebox picturebox2 port position print printing problem read regex remove right-to-left save search searchvb.net serial settings shutdown socket sorting sqldatbase sqlserver survey temperature textbox timer timespan transparency txttoxmlconverter user usercontol validation vb vb.net vb2008 vba vbnet visual visualbasic visualbasic.net visualstudio.net visualstudio2008 web webbrowser winforms winsock wpf wrapingcode xml year






