Re: Exporting to Excel using CSS

Discussion in 'ASP .Net' started by Marshal Antony, Jan 12, 2004.

  1. Are you opening another aspx file to show the dataset in Excel or you are
    showing in the same page?
    If you open another aspx file make sure it is located in a virtual
    directory with appropriate permissions.


    Regards
    Marshal Antony


    "Matt" <> wrote in message
    news:...
    > I have code that generates a dataset and sends the results to the user
    > and automatically opens Excel when the link is clicked. It works fine on
    > my own machine and one server but I get the following error on another
    > server:
    >
    > Problems cam up in the following areas during load: Missing file
    > http://abc.com/app/mystylesheet.css
    >
    > The style sheet is present on the website so it isn't missing. It's some
    > kind of permission problem but I don't know what. The working server
    > appears configured the same as the non-working server in IIS.
    >
    > Here's a basic idea of how I'm sending the data to the user:
    >
    > 1) set response.contenttype = "application/vnd.ms-excel"
    > 2) create stringwriter and htmltextwriter objects
    > 3) write the HTML HEAD information (including the LINK to the
    > stylesheet) to the htmltextwriter object
    > 4) write a BODY tag to the htmltextwriter
    > 5) fill a datagrid with the query results
    > 6) render the datagrid to the htmltextwriter
    > 7) end the BODY and HTML tags in the htmltexwriter
    > 8) reponse.write the stringwriter and do a response.end
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
     
    Marshal Antony, Jan 12, 2004
    #1
    1. Advertising

  2. Marshal Antony

    Matt Guest

    I have one report home page with links to the reports. Each report is a
    separate ASPX page. The pages follow the steps listed previously during
    the page load event. When the user clicks on the link, a page opens and
    the "open/save" dialog appears. When the select open it launches Excel.
    The report ASPX home page, the individual report ASPX pages, and the CSS
    stylesheet are all in the same root directory for the web application.

    I'm not sure what permission to set for what object and for what user.
    I've tried making the CSS accessible to all users but that doesn't
    appear to have any affect.

    This appears to only work when testing locally.



    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Matt, Jan 12, 2004
    #2
    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. Matt

    Exporting to Excel using CSS

    Matt, Jan 12, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    3,438
  2. Replies:
    1
    Views:
    1,911
    Alvin Bruney [MVP]
    May 10, 2004
  3. Luis Esteban Valencia
    Replies:
    1
    Views:
    1,419
    Carl Prothman [MVP]
    Jan 12, 2005
  4. Replies:
    1
    Views:
    583
    Rivky
    Jun 8, 2005
  5. Doogie
    Replies:
    1
    Views:
    471
    sloan
    Nov 19, 2008
Loading...

Share This Page