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. Geneate XML file from Excel Worksheet----Urgent Help me Pls

Geneate XML file from Excel Worksheet----Urgent Help me Pls

Scheduled Pinned Locked Moved C#
xmlhelp
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.
  • W Offline
    W Offline
    winpoorni
    wrote on last edited by
    #1

    Dear All,, Can U Help me to Generate the XML document from Excel Worksheet.Excel 2003 professional Edition have an option like XML in Data Menu..I have Excel 2003 Standard Edition... Please Help me to get the Solution Thanks n Regards, Ramya.R -- modified at 0:01 Friday 24th February, 2006

    V 1 Reply Last reply
    0
    • W winpoorni

      Dear All,, Can U Help me to Generate the XML document from Excel Worksheet.Excel 2003 professional Edition have an option like XML in Data Menu..I have Excel 2003 Standard Edition... Please Help me to get the Solution Thanks n Regards, Ramya.R -- modified at 0:01 Friday 24th February, 2006

      V Offline
      V Offline
      veeru_syd
      wrote on last edited by
      #2

      You can use dataset.GetXml method to get the xml private const string xcel_CONN_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties=Excel 8.0;"; internal DataSet GetExcelDataToDataSet(string filepath, string sheetname) { OleDbConnection cn = null; OleDbDataAdapter da = null; DataSet ds = null; try { cn = new OleDbConnection(string.Format(xcel_CONN_STRING, filepath)); cn.Open(); da = new OleDbDataAdapter(string.Format(xcel_sql, sheetname), cn); ds = new DataSet(); da.Fill(ds); return ds; } catch (Exception ex) { throw new Exception(ex.Message); } finally { if(cn != null) { cn.Close(); cn.Dispose(); } } }

      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