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 9011061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:37:41+00:00 2026-06-16T02:37:41+00:00

So What I’m doing is creating an excel file using epplus and saving it

  • 0

So What I’m doing is creating an excel file using epplus and saving it to response.outputstream

For some reason the code breaks giving me an error. I have no idea what I’m doing wrong.

Using package As New ExcelPackage(newFile)
        ' add a new worksheet to the empty workbook
        Dim worksheet As ExcelWorksheet = package.Workbook.Worksheets.Add("Analysis")
        Dim worksheet2 As ExcelWorksheet = package.Workbook.Worksheets.Add("Data")
        'Add the headers
        worksheet.Cells(1, 2).Value = "Key Performance Indicators"
        worksheet.Cells(1, 6).Value = MWHtotal & "MW Hours"
        worksheet.Cells(2, 3).Value = "Before Deslag"
        worksheet.Cells(2, 4).Value = "After Deslag"
        worksheet.Cells(2, 5).Value = "Percent Change"
        worksheet.Cells(2, 2).Value = aunit
        worksheet.Cells(2, 6).Value = auser & " analysis"

        worksheet.Cells(3, 2).Value = "Primary SuperHeat Draft Loss"
        worksheet.Cells(4, 2).Value = "Primary SuperHeat Draft Loss Rate"
        worksheet.Cells(5, 2).Value = "Zolo FEGT"
        worksheet.Cells(6, 2).Value = "Max Ramp Rate"
        worksheet.Cells(7, 2).Value = "Max Load"
        worksheet.Cells(8, 2).Value = "Throttle Set Pressure"
        worksheet.Cells(9, 2).Value = "Water Wall Cleanliness"
        worksheet.Cells(10, 2).Value = "Platen SH Cleanliness"
        worksheet.Cells(11, 2).Value = "SSH Cleanliness"
        worksheet.Cells(12, 2).Value = "SSH Delta Temp"
        worksheet.Cells(13, 2).Value = "Primary SH Cleanliness"
        worksheet.Cells(14, 2).Value = "SHT Attemp"
        worksheet.Cells(15, 2).Value = "DP Across SSH"
        worksheet.Cells(16, 2).Value = "RH Cleanliness"
        worksheet.Cells(17, 2).Value = "RH Delta Temp"
        worksheet.Cells(18, 2).Value = "RH Attemp"
        worksheet.Cells(19, 2).Value = "DP Across RH"
        worksheet.Cells(20, 2).Value = "Boiler Efficiency"
        worksheet.Cells(21, 2).Value = "Reheat Gas Temp(Above Horiz Reheater Grid)"
        worksheet.Cells(22, 2).Value = "Econ Gas Outlet Temp"
        worksheet.Cells(23, 2).Value = "Furnace Exit Gas Temp"
        worksheet.Cells(24, 2).Value = "East FEGT"
        worksheet.Cells(25, 2).Value = "West FEGT"
        worksheet.Cells(26, 2).Value = "Secondary SuperHeat Draft Loss"
        worksheet.Cells(27, 2).Value = "Vertical ReHeat Cleanliness Factor"
        worksheet.Cells(28, 2).Value = "Air Heat Gas Outlet Temp"
        worksheet.Cells(29, 2).Value = "Total Air Flow"
        worksheet.Cells(30, 2).Value = "MW"
        worksheet.Cells(3, 6).Value = "H2O"
        worksheet.Cells(4, 6).Value = "H2O/Min"
        worksheet.Cells(5, 6).Value = "Deg F"
        worksheet.Cells(6, 6).Value = "MW/Min"
        worksheet.Cells(7, 6).Value = "MW"
        worksheet.Cells(8, 6).Value = "Psig"
        worksheet.Cells(9, 6).Value = "Percent"
        worksheet.Cells(10, 6).Value = "Percent"
        worksheet.Cells(11, 6).Value = "Percent"
        worksheet.Cells(12, 6).Value = "Deg F"
        worksheet.Cells(13, 6).Value = "Percent"
        worksheet.Cells(14, 6).Value = "lb/hr"
        worksheet.Cells(15, 6).Value = "H2O"
        worksheet.Cells(16, 6).Value = "Percent"
        worksheet.Cells(17, 6).Value = "Deg F"
        worksheet.Cells(18, 6).Value = "lb/hr"
        worksheet.Cells(19, 6).Value = "H2O"
        worksheet.Cells(20, 6).Value = "Percent"
        worksheet.Cells(21, 6).Value = "Deg F"
        worksheet.Cells(22, 6).Value = "Deg F"
        worksheet.Cells(23, 6).Value = "Deg F"
        worksheet.Cells(24, 6).Value = "Deg F"
        worksheet.Cells(25, 6).Value = "Deg F"
        worksheet.Cells(26, 6).Value = "H2O"
        worksheet.Cells(27, 6).Value = "Percent"
        worksheet.Cells(28, 6).Value = "Deg F"
        worksheet.Cells(29, 6).Value = "KPPH"
        worksheet.Cells(30, 6).Value = "MW"
        arraycol = 0
        arrayrow = 0
        For i = 0 To pdata.Count
            worksheet2.Cells(arrayrow + 1, arraycol + 1).Value = PIArray(arrayrow, arraycol)
        Next

        worksheet.Cells(3, 3).Value = wa
        worksheet.Cells(4, 3).Value = za
        worksheet.Cells(5, 3).Value = ua
        worksheet.Cells(6, 3).Value = amaxrate
        worksheet.Cells(7, 3).Value = amax
        worksheet.Cells(8, 3).Value = ta
        worksheet.Cells(9, 3).Value = aa
        worksheet.Cells(10, 3).Value = ba
        worksheet.Cells(11, 3).Value = ca
        worksheet.Cells(12, 3).Value = da
        worksheet.Cells(13, 3).Value = ea
        worksheet.Cells(14, 3).Value = fa
        worksheet.Cells(15, 3).Value = ga
        worksheet.Cells(16, 3).Value = ha
        worksheet.Cells(17, 3).Value = ia
        worksheet.Cells(18, 3).Value = ja
        worksheet.Cells(19, 3).Value = ka
        worksheet.Cells(20, 3).Value = la
        worksheet.Cells(21, 3).Value = ma
        worksheet.Cells(22, 3).Value = na
        worksheet.Cells(23, 3).Value = oa
        worksheet.Cells(24, 3).Value = qa
        worksheet.Cells(25, 3).Value = ra
        worksheet.Cells(26, 3).Value = xa
        worksheet.Cells(27, 3).Value = ya
        worksheet.Cells(28, 3).Value = pa
        worksheet.Cells(29, 3).Value = sa
        worksheet.Cells(30, 3).Value = va
        worksheet.Cells(3, 4).Value = wb
        worksheet.Cells(4, 4).Value = zb
        worksheet.Cells(5, 4).Value = ub
        worksheet.Cells(9, 4).Value = ab
        worksheet.Cells(10, 4).Value = bb
        worksheet.Cells(11, 4).Value = cb
        worksheet.Cells(12, 4).Value = db
        worksheet.Cells(13, 4).Value = eb
        worksheet.Cells(14, 4).Value = fb
        worksheet.Cells(15, 4).Value = gb
        worksheet.Cells(16, 4).Value = hb
        worksheet.Cells(17, 4).Value = ib
        worksheet.Cells(18, 4).Value = jb
        worksheet.Cells(19, 4).Value = kb
        worksheet.Cells(20, 4).Value = lb
        worksheet.Cells(21, 4).Value = mb
        worksheet.Cells(22, 4).Value = nb
        worksheet.Cells(23, 4).Value = ob
        worksheet.Cells(24, 4).Value = qb
        worksheet.Cells(25, 4).Value = rb
        worksheet.Cells(26, 4).Value = xb
        worksheet.Cells(27, 4).Value = yb
        worksheet.Cells(28, 4).Value = pb
        worksheet.Cells(29, 4).Value = sb
        worksheet.Cells(30, 4).Value = vb
        worksheet.Cells(3, 5).Value = wpercent
        worksheet.Cells(4, 5).Value = zpercent
        worksheet.Cells(5, 5).Value = upercent
        worksheet.Cells(9, 5).Value = apercent
        worksheet.Cells(10, 5).Value = bpercent
        worksheet.Cells(11, 5).Value = cpercent
        worksheet.Cells(12, 5).Value = dpercent
        worksheet.Cells(13, 5).Value = epercent
        worksheet.Cells(14, 5).Value = fpercent
        worksheet.Cells(15, 5).Value = gpercent
        worksheet.Cells(16, 5).Value = hpercent
        worksheet.Cells(17, 5).Value = ipercent
        worksheet.Cells(18, 5).Value = jpercent
        worksheet.Cells(19, 5).Value = kpercent
        worksheet.Cells(20, 5).Value = lpercent
        worksheet.Cells(21, 5).Value = mpercent
        worksheet.Cells(22, 5).Value = npercent
        worksheet.Cells(23, 5).Value = opercent
        worksheet.Cells(24, 5).Value = qpercent
        worksheet.Cells(25, 5).Value = rpercent
        worksheet.Cells(26, 5).Value = xpercent
        worksheet.Cells(27, 5).Value = ypercent
        worksheet.Cells(28, 5).Value = ppercent
        worksheet.Cells(29, 5).Value = spercent
        worksheet.Cells(30, 5).Value = vpercent
        worksheet.Cells(3, 7).Value = wcolor
        worksheet.Cells(4, 7).Value = zcolor
        worksheet.Cells(5, 7).Value = ucolor
        worksheet.Cells(9, 7).Value = acolor
        worksheet.Cells(10, 7).Value = bcolor
        worksheet.Cells(11, 7).Value = ccolor
        worksheet.Cells(12, 7).Value = dcolor
        worksheet.Cells(13, 7).Value = ecolor
        worksheet.Cells(14, 7).Value = fcolor
        worksheet.Cells(15, 7).Value = gcolor
        worksheet.Cells(16, 7).Value = hcolor
        worksheet.Cells(17, 7).Value = icolor
        worksheet.Cells(18, 7).Value = jcolor
        worksheet.Cells(19, 7).Value = kcolor
        worksheet.Cells(20, 7).Value = lcolor
        worksheet.Cells(21, 7).Value = mcolor
        worksheet.Cells(22, 7).Value = ncolor
        worksheet.Cells(23, 7).Value = ocolor
        worksheet.Cells(24, 7).Value = qcolor
        worksheet.Cells(25, 7).Value = rcolor
        worksheet.Cells(26, 7).Value = xcolor
        worksheet.Cells(27, 7).Value = ycolor
        worksheet.Cells(28, 7).Value = pcolor
        worksheet.Cells(29, 7).Value = scolor
        worksheet.Cells(30, 7).Value = vcolor

        Response.Clear()

        Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
        Response.AppendHeader("Content-Disposition", "attachment;filename=analyze.xlsx")
        package.SaveAs(Response.OutputStream)

        Response.End()
    End Using

I get this error

0x800a139e – Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

  • 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-06-16T02:37:43+00:00Added an answer on June 16, 2026 at 2:37 am

    You probably call this from UpdatePanel, or from Ajax call – but there what you do it to clear the response header and instead of json that ajax wait for return, you send something different (here is an xlsx file) – and you get that message, that can not parse that excel.

    The ajax or the UpdatePanel can not understand that you try to send something different like this file. What you must do is to create ether handler that send this file, and place it in a hyperlink, ether remove the UpdatePanel.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to render a haml file in a javascript response like so:
We are using XSLT to translate a RIXML file to XML. Our RIXML contains
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I am doing a simple coin flipping experiment for class that involves flipping a
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and
I have this code to decode numeric html entities to the UTF8 equivalent character.

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.