Re: Can zip it before download?

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: ad (ad_at_wfes.tcc.edu.tw)
Date: 09/30/04


Date: Fri, 1 Oct 2004 04:48:39 +0800

Thanks,
I have download the shaprzip, it say that scharzip must be built with nant.
I download the source code of nant, but I don't know how to complie it(I
can't find any doc about it)
Can some one help me again?

"Mark Fitzpatrick" <markfitz@fitzme.com> ¼¶¼g©ó¶l¥ó·s»D
:OWeBLzvpEHA.3716@TK2MSFTNGP10.phx.gbl...
> You sure can, you just need another component to do it. Check out shaprzip
> (http://www.icsharpcode.net/OpenSource/SharpZipLib/Default.aspx). It
enables
> you to create a zip file and also to create and add files right into the
new
> zip. You can stream the new zip file to the browser just as you would an
> excel file. Of course your users will have to unzip the file before they
can
> open the excel file, but most users will rather have a smaller, faster
> download than be upset over having to open a zip file.
>
> Hope this helps,
> Mark Fitzpatrick
> Microsoft MVP - FrontPage
>
> "ad" <ad@wfes.tcc.edu.tw> wrote in message
> news:e%23cnPVvpEHA.596@TK2MSFTNGP11.phx.gbl...
> >I use the code below to export the content of a data set to Excel, the
code
> > come form
> > http://www.dotnetjohn.com/articles.aspx?articleid=36
> >
> > It will take a long time to dolwnload if the excel file if too big.
> > How can I zip the excel file before download?
> >
>
> --------------------------------------------------------------------------

--
> > ---------------
> >        'first let's clean up the response.object
> >        response.Clear()
> >        response.Charset = ""
> >        'set the response mime type for excel
> >        response.ContentType = "application/vnd.ms-excel"
> >        'create a string writer
> >        Dim stringWrite As New System.IO.StringWriter
> >        'create an htmltextwriter which uses the stringwriter
> >        Dim htmlWrite As New System.Web.UI.HtmlTextWriter(stringWrite)
> >        'instantiate a datagrid
> >        Dim dg As New System.Web.UI.WebControls.DataGrid
> >        'set the datagrid datasource to the dataset passed in
> >        dg.DataSource = ds.Tables(0)
> >        'bind the datagrid
> >        dg.DataBind()
> >        'tell the datagrid to render itself to our htmltextwriter
> >        dg.RenderControl(htmlWrite)
> >        'all that's left is to output the html
> >        response.Write(stringWrite.ToString)
> >        response.End()
> >
> >
>
>


Relevant Pages

  • Re: Can zip it before download?
    ... >I have download the shaprzip, it say that scharzip must be built with nant. ... >I download the source code of nant, but I don't know how to complie it(I ... >> can open the excel file, but most users will rather have a smaller, faster ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Can zip it before download?
    ... Check out shaprzip ... It enables ... open the excel file, but most users will rather have a smaller, faster ... download than be upset over having to open a zip file. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: [PHP] Re: how to send entire php webpage content to another page?
    ... in which case you'll need to use htmlspecialchars() on $out in the form ... they don't get to download the data twice). ... you re-generate this page on request. ... Trying to create an excel file ...
    (php.general)
  • Re: For a website, are Excel scripts better than other programming
    ... Can we upload the excel file as .XLS to the website. ... So we would store the excel file on the website, but download and run the ... Advice Pro ...
    (microsoft.public.excel.programming)
  • Re: MS-Excel 2007opens .xlsm file but does not display workbook/worksh
    ... Today on one specific workbook I got macro warnings (unual as it is a ... Maybe your excel file is corrupt. ... And you can also download a free demo version at http://www.datanumen.com/aer/aer.exe ...
    (microsoft.public.office.misc)