Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help in adding XML maps to a worksheet using a script


I have been trying to use a script to build, map and populate
worksheet in Excel 2003 with a .XML doc and a .XSD map.

I have not been able to mimic in a script what excel does when mappin
elements to the worksheet using drag & drop. The record marco comman
does not record anything on this d & d function. When using d & d t
map elements, it groups these columns together (blue border aroun
perimeter of all the mapped elements/columns), but using the belo
script it creates separate column lists for each column (separate blu
border around each column). This in turn makes it impossible t
export it back to .XML document, getting error when using the "View ma
for export" command.

Here is the script I use for mapping the elements to each column. Bu
like I said it maps them as separate Column Lists, a new 2003 feature.


'Map elements into spread sheet
strXPath = "/PowerShift/C1A/Customer_number"
Set xp = worksheet.Range("A1:A2").Offset(1,actColumn).XPath
xp.SetValue workbook.XmlMaps(1), strXPath
actColumn = actColumn + 1
'Map elements into spread sheet
strXPath = "/PowerShift/C1A/Customer_type"
Set xp = worksheet.Range("A1:A2").Offset(1,actColumn).XPath
xp.SetValue workbook.XmlMaps(1), strXPath
actColumn = actColumn + 1

How do I map the elements so they don't appear as separate colum
lists?

Thanks,
Rober

--
robl
-----------------------------------------------------------------------
roblo's Profile: http://www.excelforum.com/member.php...fo&userid=2246
View this thread: http://www.excelforum.com/showthread.php?threadid=39866

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
Script - Create New Worksheet Jeff C Excel Discussion (Misc queries) 6 May 17th 07 03:49 PM
getting data from excel worksheet in to a script nuti Excel Discussion (Misc queries) 0 January 12th 06 08:48 AM
VB script for converting each worksheet into individual pdf files. G Setting up and Configuration of Excel 5 November 23rd 05 03:34 AM
Adding time to script JBL Excel Programming 2 November 16th 04 10:39 PM
Excel 2000/XP script to Excel97 script hat Excel Programming 3 March 2nd 04 03:56 PM


All times are GMT +1. The time now is 09:03 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"