Excel mapping to XML Schema

While OpenXML’s WordProcessingML has the capability to attach a custom XML instance and data bind with Content Controls, Excel achieve similar goal (similar only, not exactly) by attaching a XML schema (from xl\xmlMaps.xml file) and have xpath mapping to cells. Please refer to my previous post, I can even map a sequence of XML elements as a table in Excel. This post is more like a beginner’s guide to how all this work.

1. Enable Developer tab in the Ribbon UX. Click on the Office button and open Excel options.

image

2. Click on the Popular tab, and check "Show

image

Now the Developer is visible

image

3. Now click on the Source button to open up the XML Source task pane on the right.

image

4. Click on the XML Maps button on the bottom to open up XML Maps window

image

5. The click on Add button and attach the XML Schema (.xsd) file you want.

image

6. Click OK at XML Maps window and you will see the XML Source task pane XML tree got populated with the elements of your XML schema.

image

7.  To map the elements onto the Excel sheet, I just drag and drop the elements onto the cell. Should I want to add the item list as a table, I drag the item over.

image

8. Let me populate the sheet with some data.

image

9. Now to export the data I key in just now as a XML instance of Claims, click on the Export button on the Developer tab.

image

10. Give a proper name to the XML file in the Save dialog, then open it with IE.

image 

Wala!! You can see data in the XML file is same as the one in Excel. So you can export this XML instance to any Line of Business application for data processing.

Custom XML Schema in Excel 2007 – Multi line items tip

 

Excel enables you to import your own custom XML Schema or public XML standards such as RosettaNet and bind the elements to a particular cell. Excel 2007 take one step further with the ability to detect detail line items and apply table formating as well as filtering when you drop the detail line onto the spreadsheet as below.

image

However there is a rule apply here, you must define the minOccurs and maxOccurs attribute in the element level (example here would be LineItem)

image

if you left out the minOccurs and maxOccurs attribute, Excel will not able to determine the element is a detail line.

image

Oracle BI’s blog poll about .NET 2.0 installation and support for Office 2007

Oracle Business Intelligence blogger  is doing a poll on .NET 2.0 installation out there. This maybe because that the new Oracle BI Add In for MS Office 2007 requires the .NET 2.0 installation. Yes, and I think this is a fantastic OBA adoption here with Office 2007 as the front end to Oracle’s OLAP Cube than creating a new one.

And to my surprise there is a 58% YES (23/ 39) response out there.

image

Offline OLAP Cube browsing in Excel 2007

Just realize today that I can actually download the whole OLAP cube and browse with Excel 2007 when you offline. Below are the steps:

1. Access the .ODC file online

image

2. When you click Open, you will fire up Excel and the Pivot Table Field List.

image

Construct you Excel Pivot Table view. For example I put Reason on Row Labels, Calendar Year, Quarter and Month on Column Labels and Incidents Count on Values.

image

To take the cube offline, click on Options –> OLAP Tools –> Offline OLAP

image

Because you don’t have a Offline data file,  on the Offline OLAP Settings window you will see Offline OLAP option is grayed out. Create the data file by click on Create Offline Data File.

image

 You will be presented by a wizard, click Next on the first screen

image

Because a real life data warehouse is huge and you might not want every data, you can choose the level of field you want to store in the offline data file. Then click Next.

image

Then specify the item within the level and click Next.

image

 Finally specify where you want to store the data file and click Finish

image

Now you see Offline OLAP option is enabled.

image