Results 1 to 6 of 6
  1. #1
    Join Date
    Jul 2007
    Posts
    2,050

    Excel.application

    One of my customers having his website hosted on one of my shared hosting servers wants Excel.Application to be supported as he wants to generate reports in excel format. Is it recommended on shared hosting environment? Is there any alternative?
    Prashant T.

    Don't run after Success. Run after Excellence and Success will soon follow.

  2. #2
    Join Date
    Sep 2007
    Posts
    368

    *

    Quote Originally Posted by prashant1979 View Post
    One of my customers having his website hosted on one of my shared hosting servers wants Excel.Application to be supported as he wants to generate reports in excel format. Is it recommended on shared hosting environment? Is there any alternative?

    I think you can do this by generating a empty excel file using php code and after that data will save in that file via coding.

  3. #3
    Join Date
    Jul 2007
    Posts
    2,050
    The server is a windows 2003 server and the customer is using asp.net
    Prashant T.

    Don't run after Success. Run after Excellence and Success will soon follow.

  4. #4
    Join Date
    Nov 2006
    Location
    FL
    Posts
    106
    If he is asking about Excel.Application, that tells me that they want to directly talk to Excel from with in ASP.NET.

    You would have to license Office for your server (and potentially keep it up to date for the end user to use newer features). You will also have to modify permissions in IIS so that the user can create COM objects.

    Every call to CreateObject(Excel.Application) is going to launch a copy of Excel on your server, and is going to be very slow for the end user. Creating Excel instances like this is going to be memory intensive. Excel takes 15 or so MB of memory just to launch and do nothing, creating lots of reports via Excel will be memory and cpu intensive. Also note that even the slightest hiccup in the end users code, and you're going to have instances of Excel left running on your server.

    Read more here for why you wouldn't want to do this, even on a dedicated box:
    http://support.microsoft.com/default...;EN-US;q257757


    There are two alternatives:

    One would be Office Web Components, which requires a licensed copy of Office on the server, and a license for each client generating reports with the component. Probably not something you want to get involved in.

    The other would be that the client purchase one of the many tools available for creating Excel workbooks without having Excel loaded on the server. Officewriter is just one of many available. (I have no experience with this product, and am not endorsing it.)

  5. #5
    Join Date
    Jul 2007
    Posts
    2,050
    Quote Originally Posted by hdsrob View Post
    If he is asking about Excel.Application, that tells me that they want to directly talk to Excel from with in ASP.NET.

    You would have to license Office for your server (and potentially keep it up to date for the end user to use newer features). You will also have to modify permissions in IIS so that the user can create COM objects.

    Every call to CreateObject(Excel.Application) is going to launch a copy of Excel on your server, and is going to be very slow for the end user. Creating Excel instances like this is going to be memory intensive. Excel takes 15 or so MB of memory just to launch and do nothing, creating lots of reports via Excel will be memory and cpu intensive. Also note that even the slightest hiccup in the end users code, and you're going to have instances of Excel left running on your server.

    Read more here for why you wouldn't want to do this, even on a dedicated box:
    http://support.microsoft.com/default...;EN-US;q257757


    There are two alternatives:

    One would be Office Web Components, which requires a licensed copy of Office on the server, and a license for each client generating reports with the component. Probably not something you want to get involved in.

    The other would be that the client purchase one of the many tools available for creating Excel workbooks without having Excel loaded on the server. Officewriter is just one of many available. (I have no experience with this product, and am not endorsing it.)
    Thanks a lot buddy. I found the same and had the customer provide MS office license to install MS Excel on his server and then I installed the Primary Interop Assembly for Excel and some tricks on the DCOM and voila the problem is resolved.
    Prashant T.

    Don't run after Success. Run after Excellence and Success will soon follow.

  6. #6
    Join Date
    Dec 2006
    Posts
    477
    Your risking the performance impact and possible reliability for other sites on the shared hosting by allowing that. Excel is known to throw up error message as dialog boxes even when you've set the properties in the object model to tell it not to. When that happens, you won't see it because it is running on the services desktop but you loose a thread in IIS.

    3rd party .Net assemblies to write office documents are a better alternative. Also in some situations the following hack is enough - send a Content-Type header of "application/vnd.ms-excel" and then output a bare html <table> tag with child <tr> and <td> tags. Don't include a full surrounding html document - just the table tag on its own. The page will be treated as a download, and will open in excel. Colours / formatting is preserved, but of course you won't have formulas / multiple sheets and other advanced excel features.

Similar Threads

  1. Excel VBA help
    By markjut in forum Programming Discussion
    Replies: 2
    Last Post: 11-01-2005, 02:58 PM
  2. Replies: 0
    Last Post: 08-30-2005, 10:29 AM
  3. Replies: 0
    Last Post: 01-28-2005, 04:01 PM
  4. EXCEL, please help me!!
    By YUPAPA in forum Web Hosting Lounge
    Replies: 8
    Last Post: 09-05-2002, 12:06 PM
  5. Excel (I need some help)
    By Coastie in forum Web Hosting Lounge
    Replies: 1
    Last Post: 05-26-2002, 05:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •