IMPORTANT:
this is not a Support Forum! Experienced users might answer from time to time questions posted here. If you need a professional and reliable answer, or if you want to report a bug, please contact Altova Support instead.

excel to xml mapping Options · View
shilpasarode
Posted: Tuesday, August 31, 2010 7:00:49 PM
Rank: Newbie

Joined: 8/31/2010
Posts: 9
Location: SF
Hi, I am trying to populate a part of data to my xml from excel file.

My xml xsd schema is as attached and i want to map the <users> from excel sheet to my xml file. How do i do that ? I will have multiple AddCompany nodes and excel has users for each company. Any help will be of great help to me. Thanks in advance.

File Attachment(s):
Company.xml (1kb) downloaded 217 time(s).
company.xsd (1kb) downloaded 209 time(s).
Users.xlsx (9kb) downloaded 242 time(s).


vlad
Posted: Tuesday, August 31, 2010 8:04:30 PM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Everything seems to be very simple in your case. What did you try and what didn't work?
shilpasarode
Posted: Tuesday, August 31, 2010 11:31:40 PM
Rank: Newbie

Joined: 8/31/2010
Posts: 9
Location: SF
vlad wrote:
Everything seems to be very simple in your case. What did you try and what didn't work?


Thanks for your reply vlad. It would be of great help if I can get this resolved. I worked on this during the day and i have a slightly different question this time. Hopefully my message is also clear to understand this time.

I have the following files:-
Companies.xlsn -> This excel stores company list. Company id 1 is IBM and Company id 2 is Dell
Users.xlsn -> stores User list, User's are linked with company using CompanyId
company.xsd -> Schema for the output xml

My question this time is how do i link Users to the Company. Like User Shilpa should only come under company id 1 ( which is IBM) and User Hiren should come under company id 2 ( which is dell) Right now with the mapping that i have I am getting each user under each company.

I have attached all the files including project.

File Attachment(s):
Companies.xlsx (8kb) downloaded 260 time(s).
Company.xml (1kb) downloaded 279 time(s).
company.xsd (2kb) downloaded 208 time(s).
companymapping.mfd (15kb) downloaded 246 time(s).
compuser.mfp (1kb) downloaded 248 time(s).
Users.xlsx (8kb) downloaded 240 time(s).


island
Posted: Wednesday, September 1, 2010 4:56:16 AM
Rank: Newbie

Joined: 10/28/2002
Posts: 1,283
Location: AT
You need a filter

Also take a look at the merging files section of the documentation.


The attached mapping outputs the users in the appropriate company.


File Attachment(s):
companymapping_amended.mfd (16kb) downloaded 238 time(s).


shilpasarode
Posted: Thursday, September 9, 2010 9:09:15 PM
Rank: Newbie

Joined: 8/31/2010
Posts: 9
Location: SF
island wrote:
You need a filter

Also take a look at the merging files section of the documentation.


The attached mapping outputs the users in the appropriate company.




Thank island, that mapping helped me understand what i needed to do.
shilpasarode
Posted: Thursday, September 9, 2010 9:25:07 PM
Rank: Newbie

Joined: 8/31/2010
Posts: 9
Location: SF
Hi,

I have one more question. In companymaping_ammended.mfd, we have worksheet name as Users. I want the mapping to work even if the input file Users.xls have a different worksheet name, like sheet1. How to achieve this ? The thing is we will get these input files called Users.xlsx from a 70 different client application and we do not want to enforce them to maintain the same worksheet name.

Thanks,
Shilpa
vlad
Posted: Friday, September 10, 2010 5:23:37 AM
Rank: Advanced Member

Joined: 12/13/2005
Posts: 2,856
Location: Mauritius
Click the button right from the worksheet name and uncheck "Show Worksheets by name"
shilpasarode
Posted: Friday, September 10, 2010 5:15:51 PM
Rank: Newbie

Joined: 8/31/2010
Posts: 9
Location: SF
vlad wrote:
Click the button right from the worksheet name and uncheck "Show Worksheets by name"


Thanks Vlad, that worked.
Users browsing this topic
guest

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Use of the Altova User Forum(s) is governed by the Altova Terms of Use.