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. General Programming
  3. C#
  4. Converting HTML File to Excel File and XML File using c# Code

Converting HTML File to Excel File and XML File using c# Code

Scheduled Pinned Locked Moved C#
csharphtmlxmltutorial
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.
  • S Offline
    S Offline
    shavil
    wrote on last edited by
    #1

    Hi, Can any one suggest me how to convert HTML file to Excel and Pdf . In C# Code only I have html file i want 2 generate that file to Excel and PDF

    M 1 Reply Last reply
    0
    • S shavil

      Hi, Can any one suggest me how to convert HTML file to Excel and Pdf . In C# Code only I have html file i want 2 generate that file to Excel and PDF

      M Offline
      M Offline
      Mike Ellison
      wrote on last edited by
      #2

      There's a lot of different approaches. You could use an XSLT transformation, assuming the HTML is well-formed. (example: http://ewbi.blogs.com/develops/2005/01/create_excels_s.html[^]). For pdf's, you'd probably be converting to XSL-FO, then using a converter to pdf (example and information: http://html2fo.sourceforge.net/[^]; http://www.ibm.com/developerworks/library/x-xslfo2app/[^]) You could use 3rd party components to do the creation/conversion. (XL example: http://www.gemboxsoftware.com/GBSpreadsheetFree.htm[^]; pdf example: 100% .NET component for rendering PDF documents[^]) You could try a more targeted programmatic approach to create the output directly, if you didn't need a full-featured 3rd party component. Try a Google search for something like "html to excel c#" for a bunch of examples. You could also, at least for the XL side, use interop. (example: http://support.microsoft.com/kb/302084[^]) I think the approach you use ultimately depends on the specifics of your situation, and how much complexity in the excel/pdf document you need to support.

      MishaInTheCloud.blogspot.com

      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