Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default macro code for XML Fill

Dear friend,
i need to read xml and i need to fill in my excel workbook

for example
i need to loop through the xml and fill values in my EXcel Workbook the
example
for loop xmldatas
ColumnA :id
columnB :name
columnC :mark
columnD:designation
next

so like this i need to fill my excel values.can u please help me to do this
please friend

this is my xml:

<?xml version="1.0"?
<data
<student
<id1</id
<nameRaymond</name
<age11</age
<mark0</mark
<designationengneer</designation
</student


<student<id2</id
<nameMoon</name
<age11</age
<mark100</mark
<designationblody</designation
</student


<student<id3</id
<nameBilly</name
<age11</age
<mark100</mark
<designationpassd</designation
</student


<student<id4</id
<namePan</name
<age12</age
<mark80</mark
<designationvhonr</designation
</student


<student<id5</id
<nameQueenie</name
<age10</age
<mark90</mark
<designationsogjg</designation
</student


</data
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default macro code for XML Fill

Look at the microsoft webpage. This method works very well. make sure you
add the References to the VBA window as instructions specify.

If this doesn't help, I can write code to perform the task.

"born2achieve" wrote:

Dear friend,
i need to read xml and i need to fill in my excel workbook

for example
i need to loop through the xml and fill values in my EXcel Workbook the
example
for loop xmldatas
ColumnA :id
columnB :name
columnC :mark
columnD:designation
next

so like this i need to fill my excel values.can u please help me to do this
please friend

this is my xml:

<?xml version="1.0"?
<data
<student
<id1</id
<nameRaymond</name
<age11</age
<mark0</mark
<designationengneer</designation
</student


<student<id2</id
<nameMoon</name
<age11</age
<mark100</mark
<designationblody</designation
</student


<student<id3</id
<nameBilly</name
<age11</age
<mark100</mark
<designationpassd</designation
</student


<student<id4</id
<namePan</name
<age12</age
<mark80</mark
<designationvhonr</designation
</student


<student<id5</id
<nameQueenie</name
<age10</age
<mark90</mark
<designationsogjg</designation
</student


</data

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default macro code for XML Fill

Dear joel,
pls i am need of your code.please help me to do this
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default macro code for XML Fill

I went back to your posting on Jan 7th. what was the results of my changes?
Did you add the references to the VBA code? did it give you any results?
Did you look at this web page (listing 9)
http://msdn2.microsoft.com/en-us/lib...fice.11).aspx?

let me know what you are havving problems with and I will help. The actual
webbpage of the XML text code (use notepad to open XML page and post results).

I added activesheet in front of combox1. Also added library references as
stated below

On the Project menu, click References. Select the type libraries for
Microsoft ActiveX Data Object 2.5 (or later) and Microsoft XML 3.0.

Sub test()

Dim articleDoc As New DOMDocument
Dim sections As IXMLDOMNodeList
Dim sectionNode As IXMLDOMNode
Dim s As String
articleDoc.async = False
articleDoc.Load ("C:\temp\test\test.xml")
'Me.Caption = articleDoc.selectSingleNode("//student/name").Text

Set sections = articleDoc.selectNodes("//student")
ActiveSheet.ComboBox1.Clear

For Each sectionNode In sections
ActiveSheet.ComboBox1.AddItem
(sectionNode.selectSingleNode("name").Text)
Next
ActiveSheet.ComboBox1.ListIndex = 0

End Sub



"born2achieve" wrote:

Dear joel,
pls i am need of your code.please help me to do this

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default macro code for XML Fill



Dear Joel, thanks for your help,thanks a lot


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA code to fill down Secret Squirrel Excel Discussion (Misc queries) 6 May 23rd 08 05:48 PM
auto fill code balu Excel Discussion (Misc queries) 3 November 19th 07 07:08 PM
sub won't fill down via code SLP Excel Programming 3 November 2nd 07 05:38 PM
Fill down - adjust code J.W. Aldridge Excel Programming 2 August 4th 07 02:46 PM
List Fill Code Cody Excel Programming 5 August 2nd 05 05:19 PM


All times are GMT +1. The time now is 05:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"