|
|
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).
|
|
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?
|
|
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).
|
|
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).
|
|
Rank: Newbie
Joined: 8/31/2010 Posts: 9 Location: SF
|
island wrote:You need a filterAlso 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.
|
|
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
|
|
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"
|
|
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.
|
|
|
guest |