LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Attaching a xml schema to a excel worksheet

This has to be so simple its untrue, but nowhere can I find how to achieve this
simple task, using VB.
I can do the task manually very easily.
create a new worksheet. - Insert - worksheet
attach schema - data - xml - xml source...
in xml Source frame click on XML Maps....
in XML Maps window click on Add
in Select XML Source window select appropriate .xsd file and click open
back to XML Maps window and ok
structure appears in XML source window.

I can also do all the above with VB thus :-

Dim xmlSheet As Worksheet
Set xmlSheet = Worksheets.Add(After:=Sheets("sheet9"))
xmlSheet.Name = "XmlData"

Set xmlObj =
ActiveWorkbook.XmlMaps.Add("C:\subversion\FM\xml\s imulate.xsd",
"data")
xmlObj.Name = "data_Map"

Now the next bit is dead easy manually,
go into the XML Source frame click on the top level object in the maps window
to select it now point at it, click and drag to worksheet cell A1 and drop
and the whole structure list appears with all the correct headings in the
columns and as a list as the xml schema says.

So whats the VB to do this?
I've tried macro record and it shows nothing.
I can get as far as creating the list but then I have to puts the names in as
literals in the code, which is odd as they are already know. but only seem
to appear in the .xml object as a string of the schema source, which I would
have to process. There must be an easier way

Help please.

 
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
Embedding an Excel 2007 worksheet into an email without attaching Peoplemover13 Excel Discussion (Misc queries) 2 July 9th 09 08:36 PM
Mapping Worksheet - XML Schema Dave Excel Programming 0 October 24th 05 02:29 PM
Attaching a worksheet to an e-mail Brian Matlack Excel Discussion (Misc queries) 0 October 12th 05 03:59 PM
Attaching One Worksheet to Email KeshnerH Excel Programming 1 January 26th 05 07:27 PM
Attaching a JET database to an Excel Worksheet OR storing large binary data in a worksheet Ant Waters Excel Programming 1 September 3rd 03 11:34 AM


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