Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumerror when exporting xml content to excel sheet from a user controlerror when exporting xml content to excel sheet from a user control
Previous
 
Next
New Post
7/16/2008 11:51 AM
 

Hi,

     I could not view the output (Excel file) when i trying

to export the xml content to a excel sheet from an user

control. I use the following code in the user control:

XmlDocument xdoc = new XmlDocument();

xdoc.LoadXml(sb.ToString());

Stream streamOut = new MemoryStream();


XslCompiledTransform transformFile = new

XslCompiledTransform();

string strTransformFileName = strXSLFile;

transformFile.Load(Server.MapPath(strTransformFileName));


transformFile.Transform(xdoc, null, streamOut);

streamOut.Flush();

streamOut.Position = 0;

System.IO.StreamReader sr = new System.IO.StreamReader

(streamOut);

string xmlOut = sr.ReadToEnd();

Response.AppendHeader("Content-disposition", "inline;

filename=" + strXLSFile);

Response.ContentType = "text/excel";

Response.Write(xmlOut); //xmlOut content is fine here when i

view through quick watch

Response.Flush();

sr.Close();

streamOut.Close();

After saving the output file and when i try to view the page

i get the following error

"Problem during load:Unknown, File cannot be loaded because

of errors.Error are listed in......<file name>" and when i

open the error list page i get the following error

XML PARSE ERROR:  Non-unique or duplicate attribute
  Error occurs at or below this element stack:
    <html>
     <body>
      <form>
       <div>
        <div>
         <div>
          <div>
           <div>
            <div>
             <table>
              <tr>
               <td>

Where as when i use the same content in aspx page i could

able to view the output file.

Can any one help me how to solve this..

 
New Post
7/16/2008 3:17 PM
 

Is your question reladed to the Forum Module?  If not you are wrong here.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumerror when exporting xml content to excel sheet from a user controlerror when exporting xml content to excel sheet from a user control


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out