Programmatically creating Excel spreadsheets in ASP.NET

Discussion in 'ASP .Net' started by Raoul Snyman, Apr 29, 2004.

  1. Raoul Snyman

    Raoul Snyman Guest

    Hi,

    I need to be able to programatically create excel spreadsheets in
    ASP.NET (C#), WITHOUT having MS Office on the server.

    Does anybody have any advice/links/whatever for me?

    Thanks in advance,

    Raoul.
     
    Raoul Snyman, Apr 29, 2004
    #1
    1. Advertising

  2. Raoul Snyman

    CT Guest

    Hmm, one way is to have a grid control that can export to an Excel sheet,
    but otherwise you need a third-party control that does it for you. Here are
    some links:
    http://www.infragistics.com/products/grids.asp
    http://www.devdirect.com/ALL/GRID_PCAT_1855.aspx


    --
    Carsten Thomsen
    Enterprise Development with VS .NET, UML, and MSF
    http://www.apress.com/book/bookDisplay.html?bID=105
    "Raoul Snyman" <> wrote in message
    news:...
    > Hi,
    >
    > I need to be able to programatically create excel spreadsheets in
    > ASP.NET (C#), WITHOUT having MS Office on the server.
    >
    > Does anybody have any advice/links/whatever for me?
    >
    > Thanks in advance,
    >
    > Raoul.
     
    CT, Apr 29, 2004
    #2
    1. Advertising

  3. Raoul Snyman

    Don Guest

    Hi Raoul,

    Our Spread for Web Forms is a spreadsheet component that will import
    and export Excel files, as well as many other features. Here's the
    link for more info if you're interested in downloading a trial:
    http://www.fpoint.com/netproducts/spreadweb/spread.html

    - Donald
    FarPoint


    (Raoul Snyman) wrote in message news:<>...
    > Hi,
    >
    > I need to be able to programatically create excel spreadsheets in
    > ASP.NET (C#), WITHOUT having MS Office on the server.
    >
     
    Don, Apr 29, 2004
    #3
  4. Raoul Snyman

    Curt_C [MVP] Guest

    have you looked at the content type setting in the page declaration?

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Raoul Snyman" <> wrote in message
    news:...
    > Hi,
    >
    > I need to be able to programatically create excel spreadsheets in
    > ASP.NET (C#), WITHOUT having MS Office on the server.
    >
    > Does anybody have any advice/links/whatever for me?
    >
    > Thanks in advance,
    >
    > Raoul.
     
    Curt_C [MVP], Apr 29, 2004
    #4
  5. I belive the ContentType header will only help when you already have an
    Excel file to send.

    If you do not want to install MS Office then you have to look for third
    party solution which will write an excel file from scratch.
    It will be much cheaper to buy one than to write it yourself.

    George.

    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:%...
    > have you looked at the content type setting in the page declaration?
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "Raoul Snyman" <> wrote in message
    > news:...
    > > Hi,
    > >
    > > I need to be able to programatically create excel spreadsheets in
    > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > >
    > > Does anybody have any advice/links/whatever for me?
    > >
    > > Thanks in advance,
    > >
    > > Raoul.

    >
    >
     
    George Ter-Saakov, Apr 29, 2004
    #5
  6. Raoul Snyman

    Curt_C [MVP] Guest

    build a table in html, set the content type to excel (lookup the exact
    phrase) and your page should generate as a spreadsheet, and the client will
    execute their spreadsheet app or be prompted for download.

    That's what I believe will work

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "George Ter-Saakov" <> wrote in message
    news:...
    > I belive the ContentType header will only help when you already have an
    > Excel file to send.
    >
    > If you do not want to install MS Office then you have to look for third
    > party solution which will write an excel file from scratch.
    > It will be much cheaper to buy one than to write it yourself.
    >
    > George.
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:%...
    > > have you looked at the content type setting in the page declaration?
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "Raoul Snyman" <> wrote in message
    > > news:...
    > > > Hi,
    > > >
    > > > I need to be able to programatically create excel spreadsheets in
    > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > >
    > > > Does anybody have any advice/links/whatever for me?
    > > >
    > > > Thanks in advance,
    > > >
    > > > Raoul.

    > >
    > >

    >
    >
     
    Curt_C [MVP], Apr 29, 2004
    #6
  7. Cool. I did not know that.
    Is it working with Excel 2000? Or XP only?

    George.


    "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    news:...
    > build a table in html, set the content type to excel (lookup the exact
    > phrase) and your page should generate as a spreadsheet, and the client

    will
    > execute their spreadsheet app or be prompted for download.
    >
    > That's what I believe will work
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "George Ter-Saakov" <> wrote in message
    > news:...
    > > I belive the ContentType header will only help when you already have an
    > > Excel file to send.
    > >
    > > If you do not want to install MS Office then you have to look for third
    > > party solution which will write an excel file from scratch.
    > > It will be much cheaper to buy one than to write it yourself.
    > >
    > > George.
    > >
    > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > news:%...
    > > > have you looked at the content type setting in the page declaration?
    > > >
    > > > --
    > > > Curt Christianson
    > > > Owner/Lead Developer, DF-Software
    > > > Site: http://www.Darkfalz.com
    > > > Blog: http://blog.Darkfalz.com
    > > >
    > > >
    > > > "Raoul Snyman" <> wrote in message
    > > > news:...
    > > > > Hi,
    > > > >
    > > > > I need to be able to programatically create excel spreadsheets in
    > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > >
    > > > > Does anybody have any advice/links/whatever for me?
    > > > >
    > > > > Thanks in advance,
    > > > >
    > > > > Raoul.
    > > >
    > > >

    > >
    > >

    >
    >
     
    George Ter-Saakov, Apr 29, 2004
    #7
  8. Raoul Snyman

    Bob Cummings Guest

    Raoul Snyman wrote:
    > Hi,
    >
    > I need to be able to programatically create excel spreadsheets in
    > ASP.NET (C#), WITHOUT having MS Office on the server.
    >
    > Does anybody have any advice/links/whatever for me?
    >
    > Thanks in advance,
    >
    > Raoul.


    Hi Raoul

    We ran into the same situation with our senior class project. We
    cheated and used some vb script to solve the problem.

    If you are going to have excel on the client machine and it is a local
    intranet (for security settings) you can display the data as a datagrid.
    And then use some vbscript to convert the datagrid to an excel spread
    sheet. The only problem we ran across was having to set the security
    settings on IE to prompt for initialize and script active X security
    setting.

    Otherwise one of my team member was suggesting the same thing as Curt.

    Bob
     
    Bob Cummings, Apr 29, 2004
    #8
  9. Raoul Snyman

    Patrice Guest

    Was possible since at least Excel 97 (much slower though to convert a big
    file). With later version you could also probably use the XML schema used to
    save Excel files though doing this yourself may still be overkill compared
    with buying a component.

    Patrice

    "George Ter-Saakov" <> a écrit dans le message de
    news:...
    > Cool. I did not know that.
    > Is it working with Excel 2000? Or XP only?
    >
    > George.
    >
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:...
    > > build a table in html, set the content type to excel (lookup the exact
    > > phrase) and your page should generate as a spreadsheet, and the client

    > will
    > > execute their spreadsheet app or be prompted for download.
    > >
    > > That's what I believe will work
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "George Ter-Saakov" <> wrote in message
    > > news:...
    > > > I belive the ContentType header will only help when you already have

    an
    > > > Excel file to send.
    > > >
    > > > If you do not want to install MS Office then you have to look for

    third
    > > > party solution which will write an excel file from scratch.
    > > > It will be much cheaper to buy one than to write it yourself.
    > > >
    > > > George.
    > > >
    > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > news:%...
    > > > > have you looked at the content type setting in the page declaration?
    > > > >
    > > > > --
    > > > > Curt Christianson
    > > > > Owner/Lead Developer, DF-Software
    > > > > Site: http://www.Darkfalz.com
    > > > > Blog: http://blog.Darkfalz.com
    > > > >
    > > > >
    > > > > "Raoul Snyman" <> wrote in message
    > > > > news:...
    > > > > > Hi,
    > > > > >
    > > > > > I need to be able to programatically create excel spreadsheets in
    > > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > > >
    > > > > > Does anybody have any advice/links/whatever for me?
    > > > > >
    > > > > > Thanks in advance,
    > > > > >
    > > > > > Raoul.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Patrice, Apr 29, 2004
    #9
  10. Raoul Snyman

    Curt_C [MVP] Guest

    It's not really Excel Version Specific, it's just a generic "spreadsheet".
    Whatever app they have set to open .XLS will be called.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "George Ter-Saakov" <> wrote in message
    news:...
    > Cool. I did not know that.
    > Is it working with Excel 2000? Or XP only?
    >
    > George.
    >
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:...
    > > build a table in html, set the content type to excel (lookup the exact
    > > phrase) and your page should generate as a spreadsheet, and the client

    > will
    > > execute their spreadsheet app or be prompted for download.
    > >
    > > That's what I believe will work
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "George Ter-Saakov" <> wrote in message
    > > news:...
    > > > I belive the ContentType header will only help when you already have

    an
    > > > Excel file to send.
    > > >
    > > > If you do not want to install MS Office then you have to look for

    third
    > > > party solution which will write an excel file from scratch.
    > > > It will be much cheaper to buy one than to write it yourself.
    > > >
    > > > George.
    > > >
    > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > news:%...
    > > > > have you looked at the content type setting in the page declaration?
    > > > >
    > > > > --
    > > > > Curt Christianson
    > > > > Owner/Lead Developer, DF-Software
    > > > > Site: http://www.Darkfalz.com
    > > > > Blog: http://blog.Darkfalz.com
    > > > >
    > > > >
    > > > > "Raoul Snyman" <> wrote in message
    > > > > news:...
    > > > > > Hi,
    > > > > >
    > > > > > I need to be able to programatically create excel spreadsheets in
    > > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > > >
    > > > > > Does anybody have any advice/links/whatever for me?
    > > > > >
    > > > > > Thanks in advance,
    > > > > >
    > > > > > Raoul.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Curt_C [MVP], Apr 29, 2004
    #10
  11. Raoul Snyman

    Curt_C [MVP] Guest

    Oh, and .DOC types (by specifying word) will work as well, for those
    interested, or rather it should :}

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "George Ter-Saakov" <> wrote in message
    news:...
    > Cool. I did not know that.
    > Is it working with Excel 2000? Or XP only?
    >
    > George.
    >
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > news:...
    > > build a table in html, set the content type to excel (lookup the exact
    > > phrase) and your page should generate as a spreadsheet, and the client

    > will
    > > execute their spreadsheet app or be prompted for download.
    > >
    > > That's what I believe will work
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "George Ter-Saakov" <> wrote in message
    > > news:...
    > > > I belive the ContentType header will only help when you already have

    an
    > > > Excel file to send.
    > > >
    > > > If you do not want to install MS Office then you have to look for

    third
    > > > party solution which will write an excel file from scratch.
    > > > It will be much cheaper to buy one than to write it yourself.
    > > >
    > > > George.
    > > >
    > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > news:%...
    > > > > have you looked at the content type setting in the page declaration?
    > > > >
    > > > > --
    > > > > Curt Christianson
    > > > > Owner/Lead Developer, DF-Software
    > > > > Site: http://www.Darkfalz.com
    > > > > Blog: http://blog.Darkfalz.com
    > > > >
    > > > >
    > > > > "Raoul Snyman" <> wrote in message
    > > > > news:...
    > > > > > Hi,
    > > > > >
    > > > > > I need to be able to programatically create excel spreadsheets in
    > > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > > >
    > > > > > Does anybody have any advice/links/whatever for me?
    > > > > >
    > > > > > Thanks in advance,
    > > > > >
    > > > > > Raoul.
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Curt_C [MVP], Apr 29, 2004
    #11
  12. Raoul Snyman

    rupert789 Guest

    you can create a simple comma separated list of data in the asp.net
    application and save this to a file with the extension ".csv" then
    send the file to the requesting client.

    If they have excel installed on their machine, the .csv file will be
    opened with Excel by default....
     
    rupert789, Apr 29, 2004
    #12
  13. The only problem we had with this approach: You can not specify datatypes.
    So some columns that supposed to be dates were converted to long numbers and
    some part numbers (with dash) were converted to the dates.

    George.


    "rupert789" <> wrote in message
    news:...
    > you can create a simple comma separated list of data in the asp.net
    > application and save this to a file with the extension ".csv" then
    > send the file to the requesting client.
    >
    > If they have excel installed on their machine, the .csv file will be
    > opened with Excel by default....
     
    George Ter-Saakov, Apr 29, 2004
    #13
  14. Raoul Snyman

    Patrice Guest

    Could work also with the SYLK format if it still exists ? (back to Multiplan
    ?)

    Patrice

    "Curt_C [MVP]" <software_AT_darkfalz.com> a écrit dans le message de
    news:...
    > It's not really Excel Version Specific, it's just a generic "spreadsheet".
    > Whatever app they have set to open .XLS will be called.
    >
    > --
    > Curt Christianson
    > Owner/Lead Developer, DF-Software
    > Site: http://www.Darkfalz.com
    > Blog: http://blog.Darkfalz.com
    >
    >
    > "George Ter-Saakov" <> wrote in message
    > news:...
    > > Cool. I did not know that.
    > > Is it working with Excel 2000? Or XP only?
    > >
    > > George.
    > >
    > >
    > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > news:...
    > > > build a table in html, set the content type to excel (lookup the exact
    > > > phrase) and your page should generate as a spreadsheet, and the client

    > > will
    > > > execute their spreadsheet app or be prompted for download.
    > > >
    > > > That's what I believe will work
    > > >
    > > > --
    > > > Curt Christianson
    > > > Owner/Lead Developer, DF-Software
    > > > Site: http://www.Darkfalz.com
    > > > Blog: http://blog.Darkfalz.com
    > > >
    > > >
    > > > "George Ter-Saakov" <> wrote in message
    > > > news:...
    > > > > I belive the ContentType header will only help when you already have

    > an
    > > > > Excel file to send.
    > > > >
    > > > > If you do not want to install MS Office then you have to look for

    > third
    > > > > party solution which will write an excel file from scratch.
    > > > > It will be much cheaper to buy one than to write it yourself.
    > > > >
    > > > > George.
    > > > >
    > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > > news:%...
    > > > > > have you looked at the content type setting in the page

    declaration?
    > > > > >
    > > > > > --
    > > > > > Curt Christianson
    > > > > > Owner/Lead Developer, DF-Software
    > > > > > Site: http://www.Darkfalz.com
    > > > > > Blog: http://blog.Darkfalz.com
    > > > > >
    > > > > >
    > > > > > "Raoul Snyman" <> wrote in message
    > > > > > news:...
    > > > > > > Hi,
    > > > > > >
    > > > > > > I need to be able to programatically create excel spreadsheets

    in
    > > > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > > > >
    > > > > > > Does anybody have any advice/links/whatever for me?
    > > > > > >
    > > > > > > Thanks in advance,
    > > > > > >
    > > > > > > Raoul.
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Patrice, Apr 29, 2004
    #14
  15. Raoul Snyman

    Curt_C [MVP] Guest

    dunno. You'd have to get a list of supported content types. I'm sure it's
    out there, just dont have it handy in front of me right now.

    --
    Curt Christianson
    Owner/Lead Developer, DF-Software
    Site: http://www.Darkfalz.com
    Blog: http://blog.Darkfalz.com


    "Patrice" <> wrote in message
    news:...
    > Could work also with the SYLK format if it still exists ? (back to

    Multiplan
    > ?)
    >
    > Patrice
    >
    > "Curt_C [MVP]" <software_AT_darkfalz.com> a écrit dans le message de
    > news:...
    > > It's not really Excel Version Specific, it's just a generic

    "spreadsheet".
    > > Whatever app they have set to open .XLS will be called.
    > >
    > > --
    > > Curt Christianson
    > > Owner/Lead Developer, DF-Software
    > > Site: http://www.Darkfalz.com
    > > Blog: http://blog.Darkfalz.com
    > >
    > >
    > > "George Ter-Saakov" <> wrote in message
    > > news:...
    > > > Cool. I did not know that.
    > > > Is it working with Excel 2000? Or XP only?
    > > >
    > > > George.
    > > >
    > > >
    > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > news:...
    > > > > build a table in html, set the content type to excel (lookup the

    exact
    > > > > phrase) and your page should generate as a spreadsheet, and the

    client
    > > > will
    > > > > execute their spreadsheet app or be prompted for download.
    > > > >
    > > > > That's what I believe will work
    > > > >
    > > > > --
    > > > > Curt Christianson
    > > > > Owner/Lead Developer, DF-Software
    > > > > Site: http://www.Darkfalz.com
    > > > > Blog: http://blog.Darkfalz.com
    > > > >
    > > > >
    > > > > "George Ter-Saakov" <> wrote in message
    > > > > news:...
    > > > > > I belive the ContentType header will only help when you already

    have
    > > an
    > > > > > Excel file to send.
    > > > > >
    > > > > > If you do not want to install MS Office then you have to look for

    > > third
    > > > > > party solution which will write an excel file from scratch.
    > > > > > It will be much cheaper to buy one than to write it yourself.
    > > > > >
    > > > > > George.
    > > > > >
    > > > > > "Curt_C [MVP]" <software_AT_darkfalz.com> wrote in message
    > > > > > news:%...
    > > > > > > have you looked at the content type setting in the page

    > declaration?
    > > > > > >
    > > > > > > --
    > > > > > > Curt Christianson
    > > > > > > Owner/Lead Developer, DF-Software
    > > > > > > Site: http://www.Darkfalz.com
    > > > > > > Blog: http://blog.Darkfalz.com
    > > > > > >
    > > > > > >
    > > > > > > "Raoul Snyman" <> wrote in message
    > > > > > > news:...
    > > > > > > > Hi,
    > > > > > > >
    > > > > > > > I need to be able to programatically create excel spreadsheets

    > in
    > > > > > > > ASP.NET (C#), WITHOUT having MS Office on the server.
    > > > > > > >
    > > > > > > > Does anybody have any advice/links/whatever for me?
    > > > > > > >
    > > > > > > > Thanks in advance,
    > > > > > > >
    > > > > > > > Raoul.
    > > > > > >
    > > > > > >
    > > > > >
    > > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Curt_C [MVP], Apr 29, 2004
    #15
    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. John Machin
    Replies:
    15
    Views:
    790
  2. spirit
    Replies:
    4
    Views:
    572
    spirit
    Aug 3, 2007
  3. WISEMANOFNARNIA
    Replies:
    1
    Views:
    373
    Alexey Smirnov
    Oct 16, 2008
  4. Replies:
    12
    Views:
    1,659
    brooklineTom
    Jan 7, 2009
  5. Jeff

    DTS Package using Excel Spreadsheets

    Jeff, Aug 28, 2003, in forum: ASP General
    Replies:
    0
    Views:
    185
Loading...

Share This Page