View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Rohan Rohan is offline
external usenet poster
 
Posts: 15
Default XmlImport Problem in Excel 2007

hello,
I have an Excel template sheet named "Reference" in the workbook. I
imported a string in this sheet using VB Script. I used XmlImportXml function
with proper arguments for this.
After the import I copied the sheet at the end. I renamed this
copied sheet as "temp"
Then again I imported new string in the "Reference" sheet using
XmlImportXml function with proper arguments.
Then I saved the file as .xls.
If I have Excel 2003 on the machine the script creates two
different sheets with different contents. Which is fine and as expected.
But if I have Excel 2007 installed on the machine then the same
script when run is creating two sheets with different names but the contents
of both the sheets are same. It seems the second XmlImport is overwriting the
values on old sheet and also writing values on new sheet.
I do not know why same script is working fine if machine has Excel
2003 installed and not if machine has Excel 2007 installed.
Thanks in advance if some one can help me out in this.