ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   XmlImport Problem in Excel 2007 (https://www.excelbanter.com/excel-discussion-misc-queries/205963-xmlimport-problem-excel-2007-a.html)

Rohan

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.


All times are GMT +1. The time now is 04:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com