XML to XLS - how to.

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

Post Reply
Posts: 5
Joined: Thu Feb 15, 2007 7:25 am

XML to XLS - how to.

Post by simicar » Thu Jun 12, 2008 8:01 pm


I've got two questions. I'm dealing with converting dosen of XML files
to one XLS performing a "Find pattern (perl)" function with simple code

Code: Select all

<TAG dsK="sth" nrW="sth">(.*)</TAG>

replace to

[x] extract matches (which covers only one column of data)

All I need is to get an Excel XLS (could be CSV insead, doesn't really bother) BUT,
when using two same Find pattern functions, I get void respnse.
When trying to pile up several tags in one function like:

Code: Select all

<TAG1 dsK="sth" nrW="sth">(.*)</TAG1>(.*)<TAG2 dsK="sth" nrW="sth">(.*)</TAG2>

replace to

[x] extract matches - get void response either.

Is there a solution to this? Maybe diffrent option or other code?

The second case reffers to the @inputfilename.
I've read here: viewtopic.php?f=17&t=555&p=1481&hilit=i ... name#p1481
that using it with find function is
"...not working because @inputFilename and other macros can't be used in the search string (for efficiency reasons)."
so, how to get the name of the xml file as a first column to get a:

"filename";"xml-val1";"xml-val2";"xml-val3";"xml-val4";"xml-val5";\r\n replace pattern?

Thanks in advance for the two solutions

User avatar
DataMystic Support
Site Admin
Posts: 2211
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: XML to XLS - how to.

Post by DataMystic Support » Wed Jun 18, 2008 7:56 am

You can use @inputFilename in the REPLACE string, just not in the find pattern.

Code: Select all

<TAG1 dsK="sth" nrW="sth">(.*)</TAG1>(.*)<TAG2 dsK="sth" nrW="sth">(.*)</TAG2>
Looks fine - but what is your source data? Emailing us your filter with Trial Run text would help.

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest