Create Excel file using asp.net

Discussion in 'ASP .Net' started by Rahul, Apr 11, 2007.

  1. Rahul

    Rahul Guest

    I want to create an excel file for report in asp.net 2.0 ...
    without having office installed on the server.

    Rahul
     
    Rahul, Apr 11, 2007
    #1
    1. Advertising

  2. Rahul

    mortb Guest

    The fastest way is to create a html file containing a table and renaming it
    to .xls
    We use this for large files. The html is created using a webcontrol which
    we've written on which we call the render function using a htmltextwriter
    that wraps a stringwriter.

    If you want more of the excel functionallity you'd have to get some excel
    output component.

    hope this helps!
    /mortb

    "Rahul" <> wrote in message
    news:...
    >I want to create an excel file for report in asp.net 2.0 ...
    > without having office installed on the server.
    >
    > Rahul
    >
     
    mortb, Apr 11, 2007
    #2
    1. Advertising

  3. Rahul

    Mark Rae Guest

    "Rahul" <> wrote in message
    news:...

    >I want to create an excel file for report in asp.net 2.0 ...


    No problem.

    > without having office installed on the server.


    Hurrah! Glad to hear it!

    Basically, you have three choices:

    1) HTML
    Create an HTML document and save it with a .xls extension - Excel will open
    it and treat it like a native Excel file. This method is very simple and, of
    course, free - however, it won't allow you to have more than one worksheet
    in the Excel workbook...

    2) Use the (relatively) new XML file format
    http://www.microsoft.com/downloads/...52-3547-420a-a412-00a2662442d9&displaylang=en
    http://www.microsoft.com/downloads/...80-f2c0-4b80-9ad1-2cb0c300aef9&displaylang=en
    This is also free, and incredibly powerful, but not for the faint-hearted...

    3) Use Aspose
    http://www.aspose.com/Products/Aspose.Cells/Default.aspx
    This is not free, but is extremely simple to use.
     
    Mark Rae, Apr 11, 2007
    #3
  4. Michael Nemtsev, Apr 11, 2007
    #4
  5. You could open an existing Excel file and modify it as an ADO.NET data
    source:
    http://groups.google.com/group/micr...14d90e974e5/571439ff12d7473d#571439ff12d7473d

    Or here are some other ways to create Excel output:
    http://SteveOrr.net/articles/ExcelExport.aspx

    Here's a free control that can help with Excel output (and Word, PowerPoint,
    and WordPerfect output):
    http://SteveOrr.net/articles/ExportPanel.aspx

    And here are a couple good 3rd party products that can make your chores
    easy:
    http://SteveOrr.net/reviews/AsposeExcel.aspx
    http://SteveOrr.net/reviews/OfficeWriter.aspx

    --
    I hope this helps,
    Steve C. Orr,
    MCSD, MVP, CSM, ASPInsider
    http://SteveOrr.net


    "Rahul" <> wrote in message
    news:...
    >I want to create an excel file for report in asp.net 2.0 ...
    > without having office installed on the server.
    >
    > Rahul
    >
     
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider], Apr 11, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ASP.Confused

    Re: Create Excel using asp.net

    ASP.Confused, Jul 16, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    404
    Ken Cox [Microsoft MVP]
    Jul 16, 2004
  2. Anonieko
    Replies:
    2
    Views:
    7,346
    JackStraw73
    Feb 12, 2008
  3. Robbe Morris [C# MVP]

    asp.net extracting excel charts from an Excel file

    Robbe Morris [C# MVP], Dec 15, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    491
    Robbe Morris [C# MVP]
    Dec 15, 2006
  4. =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=

    Problem with Excel reports ::::Excel 2003 Migration To Excel 2007

    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=, Oct 5, 2007, in forum: ASP .Net
    Replies:
    15
    Views:
    1,548
    =?Utf-8?B?c2hhc2hhbmsga3Vsa2Fybmk=?=
    Oct 24, 2007
  5. Grey
    Replies:
    4
    Views:
    2,048
    Mark Rae [MVP]
    Oct 17, 2007
Loading...

Share This Page