Excel to XML
I had to convert an Excel file to XML so that I could load the data into Flash. I’m always excited when I get to use Microsoft Office – so this was a real treat. Actually, it’s not too bad – but, there was one major headache.
You need Excel 2003 for this to work. (I’m using Windows)
Excel 2003 has a couple ways to export XML. You can use “Save As -> XML Spreadsheet�. But, that gives you a ridiculous file with lots more info that you want (formatting info, etc.). The better way to do it is to write an xsd (xml schema) and load that into the spreadsheet. Here’s a sample xsd defining a repeating node with a bunch of attributes.
So, save that as sample.xsd. Then open your Excel spreadsheet. Choose “Data ->XML ->XML Source�. That opens the XML Source window. Click the button “XML Maps�. Then “Add�. Then load your schema (for some reason Excel calls xsds XML Maps).
In the XML Source window, your attribute names will show up. You can drag them onto the column names of your spreadsheet to map them. After mapping, choose “Save As� choose type “XML Data�. And voila, an XML file formatted to the xsd.
Here’s the rub – and the reason you need the “dontNeed� attributes (in the xsd above). For Excel files where the columns are not of equal length or have some empty cells, the XML file will not export if you do not map the columns in sequence from left to right. (I hope there is another way around this as well) So, start at the left and map every one of the columns, until you reach the last column you need to export. Then, “right click->remove element� the attributes in the XML Source window that you don’t need. Yes this is a kluge. But it does seem to work.
The error you get if you don’t do this is “A mapped element’s relationship with other elements cannot be preserved.� That’s a really helpful message.
Infoviz Music Video
Nothing to do with Flash. But, this Royksopp video is all info design.
(via infosthetics)
Business Week
Business Week interviewed our CEO Angela Shen-Hsieh a couple weeks ago (podcast here).
We also put together an example swf for them. Article describing the swf here. Click on the Interactive Graphic link to see the swf.
The swf is a version of our bubble chart. The sample data represents leads within a sales organization. The bubbles’ visual attributes (size, color, height) can be set to different metrics. The chart is time based - you can move the date dragger at bottom to check lead status at different times. The chart is also a heat map - areas with higher lead concentrations are darker.
Here’s a direct link to the swf.
findr Slide Show
I added a slide show to findr. The previous version had a link to flickr’s slide show. But, it didn’t work very well (didn’t support multiple tags, wouldn’t always show the same pics that were displayed in findr). Loved the idea of just tying into what flickr already made, but, oh well.
Anyway, new slide show, check it out (the slide show button’s over the thumbs) …
tabEnabled
Quick demonstration of a weird bug in Flash that I just re-encountered. If you create a button and do not tabEnable it (myButton_mc.tabEnabled=true), it can become unresponsive for multiple clicks when you don’t move your mouse. Huh? Check out the swf. The two rectangles are buttons. Click them. Then select the combo box. Then, click the “not tab enabled” button multiple times without moving your mouse. Only the first click registers. This always seems to happen with components. And I just had it happen on a more complex swf without components. Setting the button to tabEnabled solves the problem.
Source.