Categories > OpenTBS with DOCX >

table:table-row problem in docx

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Michael
Date: 2011-09-21
Time: 20:15

table:table-row problem in docx

I need to generate some word documents which may need to repeat a table multiple times. Originally I create the template in OpenOffice and saved it as an .odt file. The .odt template generates the files exactly as I expect. Saving the template as a .docx file generates the following error:
TinyButStrong Error in block's definition [QuoteOptions_sub1...]:
at least one tag corresponding to table:table-row is not found.
Check opening tags, closing tags and embedding levels.

I'm assuming the problem is with the .docx template file as the code works when using the .odt template file.
The template syntax looks like the follow inside a table.
[QuoteOptions;block=begin;sub1=lines]

[QuoteOptions.optionName]
[QuoteOptions.optionUnitPrice]
[QuoteOptions.optionPrice]

[QuoteOptions_sub1;block=table:table-row]
[QuoteOptions_sub1.Category]
[QuoteOptions_sub1.Service]
[QuoteOptions_sub1.Length]
[QuoteOptions_sub1.Width]
[QuoteOptions_sub1.Sqft]
[QuoteOptions_sub1.Originals]
[QuoteOptions_sub1.Copies]
[QuoteOptions_sub1.TotalCopies]
[QuoteOptions_sub1.UnitPrice]
[QuoteOptions_sub1.TotalPrice]

[QuoteOptions;block=end]

Any ideas what might be wrong? Thanks
By: Skrol29
Date: 2011-09-23
Time: 02:46

Re: table:table-row problem in docx

Hi Michael,

The XML entity for a table row in OpenOffice is <table:table-row>.
The XML entity for a table row in MsOfffice is <w:tr>.

That's why "block=table:table-row" cannot work in Ms Office, you have to replace them with "block=w:tr"