Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
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
Using position() in XmlDataQuery df Excel Discussion (Misc queries) 0 November 24th 05 02:45 AM
Position of CellCursor on Screen (absolute position) [email protected] Excel Programming 1 November 23rd 05 02:23 AM
I am getting a error with XmlDataQuery Steve Westwood[_2_] Excel Programming 1 September 1st 05 07:46 PM
Function using XMLDataQuery in Excel: Not refreshing automatically on worksheet Luv2VBA Excel Programming 0 August 25th 05 08:42 PM
XmlMapQuery and XmlDataQuery Samples in Excel 2003 and VB.NET Jalal[_2_] Excel Programming 0 April 8th 05 08:03 PM


All times are GMT +1. The time now is 12:03 PM.

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

About Us

"It's about Microsoft Excel"