|
-
November 1st, 2010, 07:46 AM
#1
create zip file from csv in asp.net
Anyone can tell , how will i create a zip file of below csv generated code..what is the code for that?
Thanks in advance
my .csv generated code is.....
if (RadioButtonList1.SelectedItem.Text == "CSV")
{
Response.Clear();
Response.Buffer = true;
Response.AddHeader("content-disposition", "attachment;filename=DataTable.csv");
Response.Charset = "";
Response.ContentType = "application/text";
StringBuilder sb = new StringBuilder();
for (int k = 0; k < dtTemp.Columns.Count; k++)
{
sb.Append(dtTemp.Columns[k].ColumnName + ',');
}
sb.Append("\r\n");
for (int i = 0; i < dtTemp.Rows.Count; i++)
{
for (int k = 0; k < dtTemp.Columns.Count; k++)
{
sb.Append(dtTemp.Rows[i][k].ToString().Replace(",", ";") + ',');
}
sb.Append("\r\n");
}
Response.Output.Write(sb.ToString());
Response.Flush();
Response.End();
}
-
November 1st, 2010, 06:08 PM
#2
Re: create zip file from csv in asp.net
-
November 2nd, 2010, 12:10 AM
#3
Re: create zip file from csv in asp.net
i want to convert csv file to zip file..how will be that ?.i dnt have any idea..plzz.it is very urgent..i generated csv code from above code..help me any expert? Thanks in advance
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|