CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [cibien] Help me to modify perl 'excel to xml': Edit Log



cibien
Novice

Jul 25, 2012, 1:22 AM


Views: 1726
Re: [cibien] Help me to modify perl 'excel to xml'

example:

how is now:

excel
___________________________________
---------|pr_family|___pr1___|___pr2___|
___________________________________

item 1 |___1,2__|__value 1_|_value 2_|


item 2 |___1,2__|__value 3_|_value 3_|


item 3 |___1,2__|__value 5_|_value 4_|


convert to XML:

item 1 - pr_family: 1 - pr_1: value 1 - pr_2: value 2 -

item 1 - pr_family: 2 - pr_1: value 1 - pr_2: value 2 -

item 2 - pr_family: 1 - pr_1: value 3 - pr_2: value 3 -

item 2 - pr_family: 2 - pr_1: value 3 - pr_2: value 3 -

item 3 - pr_family: 1 - pr_1: value 5 - pr_2: value 4 -

item 3 - pr_family: 2 - pr_1: value 5 - pr_2: value 4 -
_________________________________________________________


how must be result, with split (',') in pr1,pr2:


excel
________________________________________________
---------|_pr_family_|____pr1________|____pr2________|
________________________________________________

item 1 |___1,2____|_value 1,value 5_|____value 2_____|

item 2 |___1,2____|_____value 3____|_value 3,value 4_|

item 3 |___1,2____|_____value 5____|____value 4_____|


convert to XML:

item 1 - pr_family: 1 - pr_1: value 1 - pr_2: value 2 -

item 1 - pr_family: 2 - pr_1: value 1 - pr_2: value 2 -

item 1 - pr_family: 1 - pr_1: value 5 - pr_2: value 2 -

item 1 - pr_family: 2 - pr_1: value 5 - pr_2: value 2 -

item 2 - pr_family: 1 - pr_1: value 3 - pr_2: value 3 -

item 2 - pr_family: 2 - pr_1: value 3 - pr_2: value 3 -

item 2 - pr_family: 1 - pr_1: value 3 - pr_2: value 4 -

item 2 - pr_family: 2 - pr_1: value 3 - pr_2: value 4 -

item 3 - pr_family: 1 - pr_1: value 5 - pr_2: value 4 -

item 3 - pr_family: 2 - pr_1: value 5 - pr_2: value 4 -
_________________________________________________________


(This post was edited by cibien on Jul 25, 2012, 1:47 AM)


Edit Log:
Post edited by cibien (Novice) on Jul 25, 2012, 1:25 AM
Post edited by cibien (Novice) on Jul 25, 2012, 1:29 AM
Post edited by cibien (Novice) on Jul 25, 2012, 1:36 AM
Post edited by cibien (Novice) on Jul 25, 2012, 1:37 AM
Post edited by cibien (Novice) on Jul 25, 2012, 1:39 AM
Post edited by cibien (Novice) on Jul 25, 2012, 1:47 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives