Tuesday, 30 September 2008

Open XML

I am working on a report that a few customers are very keen on. We take the description of roles and business processes and produce a role/task matrix to show which roles can perform which operations in the business.

The HTML version of the output is a thing of beauty if I say so myself. It has lots of merged rows so that we can represent a process consisting of several stages then in each cell in the matrix we have a pretty icon that shows the effective permissions.

Now the task is to produce the same thing in Excel. We'll be targeting Excel 2007, which means using the Open XML package format. No problem there. As mentioned in earlier postings, I have been converting our file formats to that format anyway. But now it's time to grapple with the issue of images in Excel. When you think of a tabular representation of data like this in HTML, you think of cells containing (references to) images. In Excel, however, the cells contain data and somewhere else altogether is some DrawingML that specifies what the icons look like and where they go.

I have started doing some investigation of the DrawingML but quotes like this make me think I might have a steep learning curve:

http://openxmldeveloper.org/articles/2327.aspx
"The attribute “editAs” specifies how the drawing object is moved/resized when the rows and columns are resized. For the possible values and their details, refer to page 4765 of the ECMA Open XML specification document."

Ah yes, the infamous 6,000 page document submitted for standards approval. I sense some work ahead of me.