Iconica
asked on
Extraction from XML file
I have a folder full of XML files and i want a VBA script that pulls all the data out of the XML File and put in a XLSX File and the data need to be in the correct column headings
TEST.xml
Book2.xlsx
TEST.xml
Book2.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What is on Sheet2? (the destination of the copy) Any merged cells on that sheet?
ASKER
It doesn't look like it its the same xlsx spreadsheet that I have sent you unless i'm doing something wrong
I did not send you a file, just VBA code?
ASKER
Sorry what I ment was its the same Document im working of from the one that is attached to the original question I attached 2 files an xml and a xlsx file and I have taken the VBA code and inserted this in excel and try to run the code and I selected the file I want to import then it copy's the data multiple times then errors
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Again
Thank you for your help I am not getting any error messages now but what seems to be happening is that I have selected a few files to import but its not importing all of them only the last file to be imported.
if i'm importing the 1 file this is fine but if I am importing multiple files then this only imports the last file not all of the files.
Many thanks
Jon
Thank you for your help I am not getting any error messages now but what seems to be happening is that I have selected a few files to import but its not importing all of them only the last file to be imported.
if i'm importing the 1 file this is fine but if I am importing multiple files then this only imports the last file not all of the files.
Many thanks
Jon
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> Excel just imports what the xml contains and copies that entirely.
Try opening one file with Excel by selecting the file type XML - see what Excel is 'importing', note that Excel is asking for a schema file, do you have one? You will see the same double rows because opening is basically the same as the XmlMap function is doing (without schema). Try opening that file with a schema file, does Excel import it now as expected?
Try opening one file with Excel by selecting the file type XML - see what Excel is 'importing', note that Excel is asking for a schema file, do you have one? You will see the same double rows because opening is basically the same as the XmlMap function is doing (without schema). Try opening that file with a schema file, does Excel import it now as expected?
ASKER
This is working fine now thanks for helping me out with this issue
Many Thanks
John
Many Thanks
John
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for Iconica's comment #a40618390
for the following reason:
Great solution you need to copy the VB code into visual basic and run the code
Accepted answer: 0 points for Iconica's comment #a40618390
for the following reason:
Great solution you need to copy the VB code into visual basic and run the code
ASKER
Responded very quickly and the solution is really good would definitely recommend