You can write code to automate Excel,
Or, import the XML from within Excel,
Or, make the secondary data part of your main DOM!
Excel has some good XML support in 2003. You can specify a binding and load
the xml saved by InfoPath into Excel separately (from Excel). There are some
limitations - for example, Excel won't deal with rich text nodes nor will it
grok xsd:any, but outside of that, you should be fine importing from Excel
The InfoPath export to Excel option is rather limited. I was the dev lead on
the feature and I still understand it pretty well. We had great plans for it
but Excel ended up limiting some functionality that made it hard to export
everything. The transformation is also limited to single tables or all leaf
nodes, but I think you already figure that out.
My suggestion would be to create the "map" in Excel and then import the
InfoPath-generated XML. If this is too clunky, try changing the secondary
data to include in your main DOM (or import it into a separate InfoPath
solution that uses it as a main DOM). Finally, there is always the
do-it-yourself coding option.
Hope this helps,
Patrick
Patrick Halstead
Project Manager at Qdabra