Solved

Excel - map lost when copying worksheet containing XML Maps to a separate file

Posted on 2013-12-11
7
652 Views
Last Modified: 2013-12-13
I have an Excel file with a set of XML Maps defined on a worksheet in Excel 2007.
I would like to copy this worksheet out into different workbooks and have the XML Map be retained.  Currently the copied worksheet is completely blank for XML maps after the move; and I've tried using the Exporting as XML feature on the developer tab and seems to just export the worksheet data itself in an XML format vs exporting the XML Maps.

Is there any way to do this without manually remapping in the new workbook?
Thanks!
0
Comment
Question by:shellysuelll
  • 4
  • 3
7 Comments
 
LVL 15

Expert Comment

by:WalkaboutTigger
Comment Utility
Have you reviewed the code located at

http://umid.info/node/53

?
0
 

Author Comment

by:shellysuelll
Comment Utility
I had actually taken a brief look at that exact code earlier today and it seemed to be rebuilding the XML cell by cell so I hadn't attempted it yet as i was hoping for a way to move/copy all for the sheet at once.  I will definitely give it a try tonight and let you know.
0
 

Author Comment

by:shellysuelll
Comment Utility
Question related to the code in the provided link - what does the comment line refer to:
 'XML map file must be added to Workbook_To before running this code "

When i read the code i can see that it then executes maps by referencing XmlMaps.Item(#) in the non-mapped workbook; so I guess i'm confused as to how to get those xml.Maps Items in there in the first place
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 15

Expert Comment

by:WalkaboutTigger
Comment Utility
Another thing to look at, if for no other reason then as a reference, is

http://davidovitz.blogspot.com/2010/05/howto-refresh-xml-schema-in-excel.html

where David talks about "refreshing" an XML schema within an XLSX file.

There is also a reference to the Add operation on page 105 of this book which may be of use

http://books.google.com/books?id=gMjVl2r6XzEC&pg=PA105&lpg=PA105

And also

http://msdn.microsoft.com/en-us/library/gg469857(v=office.14).aspx

which discusses creation of the map file in excel using VBA.

If you need the XML map repeatedly, have you considered using a template workbook?

In regard to your secondary question, the XML map file must be added to the workbook.to file by referencing the map file as described in the last link in this post.
0
 
LVL 15

Accepted Solution

by:
WalkaboutTigger earned 500 total points
Comment Utility
By the way, my method of answering these questions is generally more about educating the person asking the question rather than just giving an answer which may or may not precisely fit the individual's needs as these questions frequently get referenced by others having a similar, though not identical, issue.
0
 

Author Comment

by:shellysuelll
Comment Utility
Thanks for the additional info; definitely wasn't looking for precise fit answers - just trying to understand the options on this area of functionality.  I will take a read thru your provided links and then award points accordingly.  Thanks again.
0
 

Author Closing Comment

by:shellysuelll
Comment Utility
Not quite a specific answer to my question, but thanks for providing the more detailed information to reference for information. Appreciated!
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now