Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
df
 
Posts: n/a
Default Using position() in XmlDataQuery

In Excel 2003 Professional, is it possible to do the following using
XmlDataQuery - ie: use the "position()" function in the XPath:

CType(ThisWorkbook.Worksheets(1),
Excel.Worksheet).XmlDataQuery("/Doc/LineItem[position()=1]/Field")

Where the XML in the map is:

<Doc
<Stuff/
<MoreStuff/
<LineItem
<FieldFirstField</Field
</LineItem
<LineItem
<FieldSecondField</Field
</LineItem
</Doc

And have it return the cell for the "SecondField "? The XmlDataQuery
always throws an exception for me.

The reason I ask is because I need to find the cell and change it's
background colour. I only have the XML available, and it's the XML
that's telling me which cell to modify.

Thanks,
d

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
find nth position of a string TUNGANA KURMA RAJU Excel Discussion (Misc queries) 6 October 18th 05 01:25 PM
how to change the default position of a comment box Hans Feitz Excel Discussion (Misc queries) 1 September 12th 05 02:45 AM
Comment position after filter cassie Excel Discussion (Misc queries) 2 June 28th 05 12:04 AM
change horizontal header position in excel pico Excel Discussion (Misc queries) 1 June 17th 05 03:26 AM
getpivotdata() by position choop Excel Worksheet Functions 3 November 4th 04 06:17 PM


All times are GMT +1. The time now is 04:15 AM.

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"