473,396 Members | 1,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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 1942
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: :crp: | last post by:
This perl script goes through a list of files in IFILE and for each file, it sends it on to sendmail. Attachments need special handling and are signified in the email-file by having a line start with...
2
by: Richard K Bethell | last post by:
Hi, We have an application, written in ASP, that uses the ADODB.Stream to be able to open files and write byte arrays to the Response object. If one of our administrators patches the web servers...
0
by: microsoft | last post by:
Hi, I have an ASP script that initiates a ADODB.Stream like below first bit gets filename from the database strAbsFile = getfilefromDB(request.querystring("fileid")) '-- create FSO object...
48
by: Chad Z. Hower aka Kudzu | last post by:
A few of you may recognize me from the recent posts I have made about Indy <http://www.indyproject.org/indy.html> Those of you coming to .net from the Delphi world know truly how unique and...
15
by: Nathan | last post by:
I have an aspx page with a data grid, some textboxes, and an update button. This page also has one html input element with type=file (not inside the data grid and runat=server). The update...
1
by: Pedro Leite | last post by:
hello. got stalled at at point that i can no longer get my thoughts together. the point, is in classic asp, stream an excel file from a firebird database. temporarly save it if necessary...
2
by: Cuong.Tong | last post by:
Greeting, Can anyone give me some hints about parsing the mulitpart/form-data stream? I have a form looks something like this <form action="process.dll> <input type=file...
1
by: kencana | last post by:
Hi all, I was wondering why I always get "failed to open stream: HTTP request failed!" error in either loading a normal or xml file. i don't understand why i can't get the whole result. the result...
1
by: mattridings | last post by:
Hi gang, Have a script that works fine. However, it's really cpu intensive and I'm looking for suggestions on a) whether or not that's normal and if so b)a better way of doing it. Script is...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.