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. Excel to xml & xml to xslt conversion C# [modified]

Excel to xml & xml to xslt conversion C# [modified]

Scheduled Pinned Locked Moved ASP.NET
csharpxmlasp-nettutorial
4 Posts 3 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.
  • J Offline
    J Offline
    Jeneesh K Velayudhan
    wrote on last edited by
    #1

    Hi, Anybody knows how to convert an Excel file into XML and XML to XSLT in asp.net 2.0

    Thanks & Regards, Jeneesh k. v.

    modified on Tuesday, January 12, 2010 11:40 PM

    P A 2 Replies Last reply
    0
    • J Jeneesh K Velayudhan

      Hi, Anybody knows how to convert an Excel file into XML and XML to XSLT in asp.net 2.0

      Thanks & Regards, Jeneesh k. v.

      modified on Tuesday, January 12, 2010 11:40 PM

      P Offline
      P Offline
      Pranay Rana
      wrote on last edited by
      #2

      Do the following thing : step 1 :load file FileInfo fileinfo = new FileInfo(yourfilePath); step 2 : open file using jet provider string strSql = "SELECT * FROM [" + fileinfo.Name + "]"; string strCSVConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileinfo.Directory.FullName + ";" + "Extended Properties='text;HDR=No;'"; step 3 : load data set OleDbDataAdapter oleda = new OleDbDataAdapter(strSql, strCSVConnString); DataTable dtbCSV = new DataTable(); oleda.Fill(dtbCSV); step 4 : wite to xml dtbCSV.WriteXml()

      J 1 Reply Last reply
      0
      • J Jeneesh K Velayudhan

        Hi, Anybody knows how to convert an Excel file into XML and XML to XSLT in asp.net 2.0

        Thanks & Regards, Jeneesh k. v.

        modified on Tuesday, January 12, 2010 11:40 PM

        A Offline
        A Offline
        Abhishek Sur
        wrote on last edited by
        #3

        This might help you Working with MS Excel(xls / xlsx) Using MDAC and Oledb[^] You can read the excel file by the way mentioned and later write it in XML :)

        Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.


        My Latest Articles-->** Windows7 API Code Pack
        Simplify Code Using NDepend
        Basics of Bing Search API using .NET

        1 Reply Last reply
        0
        • P Pranay Rana

          Do the following thing : step 1 :load file FileInfo fileinfo = new FileInfo(yourfilePath); step 2 : open file using jet provider string strSql = "SELECT * FROM [" + fileinfo.Name + "]"; string strCSVConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + fileinfo.Directory.FullName + ";" + "Extended Properties='text;HDR=No;'"; step 3 : load data set OleDbDataAdapter oleda = new OleDbDataAdapter(strSql, strCSVConnString); DataTable dtbCSV = new DataTable(); oleda.Fill(dtbCSV); step 4 : wite to xml dtbCSV.WriteXml()

          J Offline
          J Offline
          Jeneesh K Velayudhan
          wrote on last edited by
          #4

          yes u r right, when we are using datatable/dataset. But i want any other way without using the datatable/dataset...b'coz it will consume much memory...

          Thanks & Regards, Jeneesh k. v.

          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