469,927 Members | 1,710 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,927 developers. It's quick & easy.

Need to stream and zip a .CSV file to the clients browser!

Hello,

I need to stream data from a "DataTable" to the client's machine. The data
first need to be converted to .CSV , and ziped before streaming it to the
client.

Does anyone has any experience with this? Any code snippet will be very
welcome.

Many thanks in advance

Cheers
Aug 30 '07 #1
3 1861
Hello,
>
I need to stream data from a "DataTable" to the client's machine. The
data first need to be converted to .CSV , and ziped before streaming
it to the client.
Rendering to CSV is pretty staright-forward.
How important is it to zip it? Must the user download datafile.zip containing
data.csv ?

If it's "just" for performance of transferring a large amount of data, it
might be a
lot easier to apply http compression which all modern browsers support.

Just set the metabase attribute DoDynamicCompression for your GenerateCSV.aspx
page -
more details on msdn.

>
Does anyone has any experience with this? Any code snippet will be
very welcome.

Many thanks in advance

Cheers

Aug 30 '07 #2
Hello Smith,

I'd like just add a note to Neils post, that there is http://weblogs.asp.net/owscott/archi.../12/57916.aspx
a good description how to set the gzip compression on the IIS

WBR,
Michael Nemtsev [.NET MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

Hello,

I need to stream data from a "DataTable" to the client's machine. The
data first need to be converted to .CSV , and ziped before streaming
it to the client.

Does anyone has any experience with this? Any code snippet will be
very welcome.

Many thanks in advance

Cheers

Aug 30 '07 #3

Hi Smith,

Here is a sample app that does precisely that.

http://www.nicecleanexample.com/View...=aspdotnet_csv

HTH

John

"Smith" <Sm***@pricateemail.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
Hello,

I need to stream data from a "DataTable" to the client's machine. The data
first need to be converted to .CSV , and ziped before streaming it to the
client.

Does anyone has any experience with this? Any code snippet will be very
welcome.

Many thanks in advance

Cheers


Aug 30 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by :crp: | last post: by
2 posts views Thread by Richard K Bethell | last post: by
48 posts views Thread by Chad Z. Hower aka Kudzu | last post: by
2 posts views Thread by Cuong.Tong | last post: by
1 post views Thread by kencana | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.