OWC10 - Dynamic worksheets?

B

Bob

I am trying to create a workbook in OWC10 that has a primary worksheet
followed by a variable number of worksheets providing more detail on the
primary w/s. The data is being generated by javascript and the stylesheet is
static.

The XML looks something like this:

<root>
<Projects>
<Project name="Project 1" ... />
<Project name="Project 2" .../>
</Projects>
<PastDue>
<Project name="Project 2">
<Task name="Task 1" ... />
<Task name="Task 2" .../>
</Project>
</PastDue>
</root>

The main w/s looks fine. It creates a row for each /root/Projects/Project
element.

I am trying to create additional worksheets for each /root/PastDue/Project
element with the Task elements representing the row. The page bombs without
comment. Here is the associated XSL:

<ss:Workbook>
<!-- All the style defs and the first worksheet defination
...
</ss:Workshhet> <!-- end of the main page -->

<xsl:for-each select="/root/PastDue/Project">
<ss:Worksheet> ss:Name="<xsl:value-of select="@name"/>">
<x:WorksheetOptions>
<x:ViewableRange>R1:R262144</x:ViewableRange>
<x:Selection>R5C1:R1C1</x:Selection>
<x:TopRowVisible>0</x:TopRowVisible>
<x:LeftColumnVisible>0</x:LeftColumnVisible>
<x:protectContents>False</x:protectContents>
<x:FreezePanes/>
<x:LeftColumnRightPane>1</x:LeftColumnRightPane>
<x:SplitHorizontal>1</x:SplitHorizontal>
<x:ActivePane>0</x:ActivePane>
</x:WorksheetOptions>
<c:WorksheetOptions/>

<ss:Table>
<ss:Row>
<ss:Cell>
<ss:Data ss:Type="String")>thing</ss:Data>
</ss:Cell>
</ss:Row>
</ss:Table>

</ss:Worksheet>
</xsl:for-each>
</ss:Workbook>
...

I have tried a variety of combinations for the name (using a data element,
various quoting methods).

Any help or suggetions (even "you're crazy - it just wor't work) will be
greatly appreciated.

Thanks
 
B

Bob

If anybody looks at this later this is what worked ...

<xsl:for-each select="/root/PastDue">
<ss:Worksheet>
<xsl:attribute name="ss:Name">
<xsl:value-of select="@name"/>
</xsl:attribute>
...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top