Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3214382
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T15:03:15+00:00 2026-05-17T15:03:15+00:00

using asp.net 3.5 I am trying to generate a formatted excel spreadsheet and the

  • 0

using asp.net 3.5 I am trying to generate a formatted excel spreadsheet
and the way i am doing it is:

1.Format the excel sheet with data
2.Save it as an xml spreadhseet
3.View it in notepad/textpad and remove the “data” from the xml and have a content holder
such as “DYNAMICDATA”
4.Build dynamic xml for data and replace the “DYNAMICDATA” place holder with this fresh data.
5.have all this in a stringbuilder

I m stuck here, I want to be able to Response.Write(stringbuilder)
but it does not work, I have used the appropriate MIME types etc.

However Response.TransmitFile() works when i just transmit an xml spreadsheet to browser.
but Response.TransmitFile() takes a file as an argument, I can create a temp file write the created xml and then transmit but that just seems like a heavy overhead.

Is there a way i can without creating a file, just transmitXml() using the stringbuilder contents and let the user save the spreadsheet.

thank you,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T15:03:16+00:00Added an answer on May 17, 2026 at 3:03 pm

    Maybe this will help you. put in your code:

    Response.AppendHeader("Content-Type", "application/ms-excel");
    Response.AppendHeader("Content-disposition", "attachment; filename=Rep.xls");
    Response.Charset = "";
    

    Then use your:

    Response.Write(stringbuilder);
    

    Don’t forget:

    Response.End();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Websupergoo's ABCpdf for ASP.NET and I am trying to generate PDF's
I'm using ASP.Net with MVC 3 and trying to auto generate images. In my
I am trying to generate a chart using the MS Chart Control in ASP.NET
I am trying to generate a route using ASP.NET routing, but I only want
Using ASP.NET MVC when trying to get the information stored on my Session[objectName] from
I'm using asp.net mvc2 and trying to send a list of json objects with
When using ASP.NET MVC plus Entity Framework, and trying to implement a generic repository
I'm using Asp.Net together with MySql and I'm trying to solve the error: Timeout
I am using ASP.Net and jQuery/jQuery UI and I am trying to use the
I am using ASP.Net 4.0 MVC to query active directory. I am trying to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.