Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Using XMLTextWriter

Using XMLTextWriter

Scheduled Pinned Locked Moved ASP.NET
questionxmlhelptutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vsree
    wrote on last edited by
    #1

    Hi guys, Am trying to export some data to Excel file I can succeed in exporting the data but i couldnt format the headers and data.For example, &lt;Font ss:Bold="1"/&gt; &lt;Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/&gt; if i want to include this formatting using XMLTextWriter, how can i do that? Am using the following code to export the data: for(int j=0;j<xHeader.Length;j++)//for Headers { writer.WriteString("\""); writer.WriteStartElement("xsl:value-of"); writer.WriteAttributeString("select", "'" + xHeader[j] + "'"); writer.WriteEndElement(); // xsl:value-of writer.WriteString("\""); if (j != xFields.Length - 1) writer.WriteString(" "); } I need to format this xHeader's value to be formatted as "Bold" while opening as Excel. Please help me!

    S 1 Reply Last reply
    0
    • V Vsree

      Hi guys, Am trying to export some data to Excel file I can succeed in exporting the data but i couldnt format the headers and data.For example, &lt;Font ss:Bold="1"/&gt; &lt;Alignment ss:Horizontal="Center" ss:Vertical="Bottom"/&gt; if i want to include this formatting using XMLTextWriter, how can i do that? Am using the following code to export the data: for(int j=0;j<xHeader.Length;j++)//for Headers { writer.WriteString("\""); writer.WriteStartElement("xsl:value-of"); writer.WriteAttributeString("select", "'" + xHeader[j] + "'"); writer.WriteEndElement(); // xsl:value-of writer.WriteString("\""); if (j != xFields.Length - 1) writer.WriteString(" "); } I need to format this xHeader's value to be formatted as "Bold" while opening as Excel. Please help me!

      S Offline
      S Offline
      Sandeep Akhare
      wrote on last edited by
      #2

      It seems that you are writing Xml file rather than Excel file

      Thanks and Regards Sandeep

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups