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. Visual Basic
  4. Automation of XML

Automation of XML

Scheduled Pinned Locked Moved Visual Basic
testingtoolsxmlhelp
5 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 by Using Macro and VBA facility...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

    R 1 Reply Last reply
    0
    • W winpoorni

      Dear All,, Can U Help me to Generate the XML document from Excel Worksheet by Using Macro and VBA facility...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

      R Offline
      R Offline
      RichardBerry
      wrote on last edited by
      #2

      Sub SaveAsXML() ActiveWorkbook.SaveAs Filename:= "C:\Book3.xml", FileFormat:= _ xlXMLSpreadsheet, ReadOnlyRecommended:=False, CreateBackup:=False End Sub If you are trying to save the workbook that contains the macro, you will get a message about not being able to save the vbproject, but I assume the Macro will not be in the workbook you are saving as XML?

      W 1 Reply Last reply
      0
      • R RichardBerry

        Sub SaveAsXML() ActiveWorkbook.SaveAs Filename:= "C:\Book3.xml", FileFormat:= _ xlXMLSpreadsheet, ReadOnlyRecommended:=False, CreateBackup:=False End Sub If you are trying to save the workbook that contains the macro, you will get a message about not being able to save the vbproject, but I assume the Macro will not be in the workbook you are saving as XML?

        W Offline
        W Offline
        winpoorni
        wrote on last edited by
        #3

        Dear Richard:rose: Thanks For your Reply. Actually that Worksheet is in .xls format. I need to Write a Macro that Take the Column value from the Excel Sheet and Generate the Xml File From the particular field...:(( Thanks n Regards, Ramya.R -- modified at 6:36 Thursday 23rd February, 2006

        R 1 Reply Last reply
        0
        • W winpoorni

          Dear Richard:rose: Thanks For your Reply. Actually that Worksheet is in .xls format. I need to Write a Macro that Take the Column value from the Excel Sheet and Generate the Xml File From the particular field...:(( Thanks n Regards, Ramya.R -- modified at 6:36 Thursday 23rd February, 2006

          R Offline
          R Offline
          RichardBerry
          wrote on last edited by
          #4

          Hi What do you want to do with the XML file? You can write 'text' to a file, in the following format: You can test this by taking the above, pasting it into notepad, save it. Then change the extension from txt to xml. Then try opening it with the application that requires the file. You'd have to look at the VBA help to see how to do the FileIO though. (Can help you with VB.Net code only, not VBA ->> Sorry)

          W 1 Reply Last reply
          0
          • R RichardBerry

            Hi What do you want to do with the XML file? You can write 'text' to a file, in the following format: You can test this by taking the above, pasting it into notepad, save it. Then change the extension from txt to xml. Then try opening it with the application that requires the file. You'd have to look at the VBA help to see how to do the FileIO though. (Can help you with VB.Net code only, not VBA ->> Sorry)

            W Offline
            W Offline
            winpoorni
            wrote on last edited by
            #5

            Thanks alot Richard......... :cool: Im new to Xml,Excel and VBA.Your Code Works Fine.. Once again thanks For yor Help....:cool: :rose: Thanks n Regards, Ramya.R

            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