TinyButStrong - the PHP Template Engine
Categories > OpenTBS with XLSX >

Dynamic cell

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs

By: cris
Date: 2015-01-09
Time: 17:56

Dynamic cell

Hello,

I'm trying to reuse the example for XLSX with the dynamic cell but i'm facing some troubles:

<br /><b>TinyButStrong Error</b> in block's definition &#91;tsk1.title...]: at least one tag corresponding to Cell is not found. Check opening tags, closing tags and embedding levels.<br />
<br /><b>TinyButStrong Error</b> in block's definition &#91;tsk2.t_id...]: at least one tag corresponding to Cell is not found. Check opening tags, closing tags and embedding levels.<br />
* OPENTBS DEBUG MODE: if the star, (*) on the left before the word OPENTBS, is not the very first character of this page, then your
merged Document will be corrupted when you use the OPENTBS_DOWNLOAD option. If there is a PHP error message, then you have to fix it.
If they are blank spaces, line beaks, or other unexpected characters, then you have to check your code in order to avoid them.

------------------------------
INFORMATION
------------------------------
* Debug command: OPENTBS_DEBUG_XML_SHOW
* OpenTBS version: 1.9.0
* TinyButStrong version: 3.6.2-rc-2011-02-09
* PHP version: 5.6.2YES
* Opened document: system/libraries/OpenTBS/traceability.xlsx
* Activated features for document type: openxml/xlsx
* Deleted files in the archive: none
* Added files in the archive: none
* Modified files in the archive:
  - xl/sharedStrings.xml
  - xl/worksheets/sheet1.xml

------------------------------
File merged with OpenTBS (XML reformated for debuging only): xl/sharedStrings.xml
------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="5" uniqueCount="5">
<si>
  <t>
   Software Component Traceability
  </t>
</si>
<si>
  <t>
   [onshow.datet]
  </t>
</si>
<si>
  <t>
   [emp.fname;block=Row] [emp.lname]
  </t>
</si>
<si>
  <t xml:space="preserve">
   [tsk1.title;block=Cell]
  </t>
</si>
<si>
  <t xml:space="preserve">
   [var.times2.[tsk2.t_id;block=Cell].[emp.e_id];ope=xlNum;noerr]
  </t>
</si>
</sst>
------------------------------
File merged with OpenTBS (XML reformated for debuging only): xl/worksheets/sheet1.xml
------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A4:C6"/>
<sheetViews>
  <sheetView tabSelected="1" workbookViewId="0">
   <selection activeCell="B7" sqref="B7"/>
  </sheetView>
</sheetViews>
<sheetFormatPr baseColWidth="10" defaultRowHeight="15" x14ac:dyDescent="0.25"/>
<cols>
  <col min="1" max="1" width="42" customWidth="1"/>
  <col min="2" max="2" width="29.42578125" customWidth="1"/>
  <col min="3" max="3" width="24.7109375" customWidth="1"/>
  <col min="4" max="4" width="28.140625" customWidth="1"/>
</cols>
<sheetData>
  <row r="4" spans="1:3" s="1" customFormat="1" ht="43.5" customHeight="1" x14ac:dyDescent="0.25">
   <c r="A4" s="3" t="s">
    <v>
     0
    </v>
   </c>
   <c r="C4" s="2" t="inlineStr">
    <is>
     <t>
      22/02/2014
     </t>
    </is>
   </c>
  </row>
  <row r="5" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A5" s="4"/>
   <c r="B5" t="inlineStr">
    <is>
     <t xml:space="preserve">
      [tsk1.title;block=Cell]
     </t>
    </is>
   </c>
  </row>
  <row r="6" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A6" t="inlineStr">
    <is>
     <t>
      Boby Green
     </t>
    </is>
   </c>
   <c r="B6" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
  <row r="7" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A7" t="inlineStr">
    <is>
     <t>
      Julie Robinet
     </t>
    </is>
   </c>
   <c r="B7" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
  <row r="8" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A8" t="inlineStr">
    <is>
     <t>
      Marc Plonckt
     </t>
    </is>
   </c>
   <c r="B8" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
  <row r="9" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A9" t="inlineStr">
    <is>
     <t>
      Steeve Mac King
     </t>
    </is>
   </c>
   <c r="B9" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
  <row r="10" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A10" t="inlineStr">
    <is>
     <t>
      John Travalto
     </t>
    </is>
   </c>
   <c r="B10" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
  <row r="11" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A11" t="inlineStr">
    <is>
     <t>
      Mary Douglas
     </t>
    </is>
   </c>
   <c r="B11" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
</sheetData>
<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
<pageSetup paperSize="0" orientation="portrait" r:id="rId1"/>
<drawing r:id="rId2"/>
</worksheet>* Deleted files in the archive: none* Added files in the archive: none* Modified files in the archive:xl/sharedStrings.xmlxl/worksheets/sheet1.xml

Any idea what is the problem?
By: Skrol29
Date: 2015-01-10
Time: 23:46

Re: Dynamic cell

Hi Cris,

You have to replace
"block=Cell" with "block=tbs:cell"
and
"block=Row" with "block=tbs:row"
By: cris
Date: 2015-01-12
Time: 10:52

Re: Dynamic cell

Ok thx, it's working for the example.
I think now best is that i give you my code.

here is an extract in debug mode of all array + output:

error is
<br /><b>TinyButStrong Error</b> in block's definition &#91;release_name1.title...]: at least one tag corresponding to tbs:cell is not found. Check opening tags, closing tags and embedding levels.<br />
<br /><b>TinyButStrong Error</b> in block's definition &#91;comp.title...]: at least one tag corresponding to tbs:row is not found. Check opening tags, closing tags and embedding levels.<br />




release_name1 & release_name2Array
(
    [0] => Array
        (
            [title] => SOFT 3.2.0
        )

    [1] => Array
        (
            [title] => SOFT 3.2.1
        )



)

compArray
(
    [0] => Array
        (
            [title] => Component 1
        )

    [1] => Array
        (
            [title] => Component 2
        )


)

arrayArray
(
    [Component 1] => Array
        (
            [SOFT 3.2.0] => 1.2.3.553
            [SOFT 3.2.1] => 1.2.4
        )

    [Component 2] => Array
        (
            [SOFT 3.2.1] => 1.2.3.730

        )


)
* OPENTBS DEBUG MODE: if the star, (*) on the left before the word OPENTBS, is not the very first character of this page, then your
merged Document will be corrupted when you use the OPENTBS_DOWNLOAD option. If there is a PHP error message, then you have to fix it.
If they are blank spaces, line beaks, or other unexpected characters, then you have to check your code in order to avoid them.

------------------------------
INFORMATION
------------------------------
* Debug command: OPENTBS_DEBUG_XML_SHOW
* OpenTBS version: 1.9.0
* TinyButStrong version: 3.6.2-rc-2011-02-09
* PHP version: 5.6.2YES
* Opened document: system/libraries/OpenTBS/traceability.xlsx
* Activated features for document type: openxml/xlsx
* Deleted files in the archive: none
* Added files in the archive: none
* Modified files in the archive:
  - xl/sharedStrings.xml
  - xl/worksheets/sheet1.xml

------------------------------
File merged with OpenTBS (XML reformated for debuging only): xl/sharedStrings.xml
------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="5" uniqueCount="5">
<si>
  <t>
   Software Component Traceability
  </t>
</si>
<si>
  <t>
   [onshow.datet]
  </t>
</si>
<si>
  <t>
   [comp.title;block=tbs:row]
  </t>
</si>
<si>
  <t xml:space="preserve">
   [release_name1.title;block=tbs:cell]
  </t>
</si>
<si>
  <t xml:space="preserve">
   [var.array.[comp.title;block=tbs:cell].[release_name1.title];ope=xlNum;noerr]
  </t>
</si>
</sst>
------------------------------
File merged with OpenTBS (XML reformated for debuging only): xl/worksheets/sheet1.xml
------------------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac">
<dimension ref="A4:C6"/>
<sheetViews>
  <sheetView tabSelected="1" workbookViewId="0">
   <selection activeCell="B5" sqref="B5:B6"/>
  </sheetView>
</sheetViews>
<sheetFormatPr baseColWidth="10" defaultRowHeight="15" x14ac:dyDescent="0.25"/>
<cols>
  <col min="1" max="1" width="42" customWidth="1"/>
  <col min="2" max="2" width="29.42578125" customWidth="1"/>
  <col min="3" max="3" width="24.7109375" customWidth="1"/>
  <col min="4" max="4" width="28.140625" customWidth="1"/>
</cols>
<sheetData>
  <row r="4" spans="1:3" s="1" customFormat="1" ht="43.5" customHeight="1" x14ac:dyDescent="0.25">
   <c r="A4" s="3" t="s">
    <v>
     0
    </v>
   </c>
   <c r="C4" s="2" t="inlineStr">
    <is>
     <t>
      22/02/2014
     </t>
    </is>
   </c>
  </row>
  <row r="5" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A5" s="4"/>
   <c r="B5" t="inlineStr">
    <is>
     <t xml:space="preserve">
      [release_name1.title;block=tbs:cell]
     </t>
    </is>
   </c>
  </row>
  <row r="6" spans="1:3" x14ac:dyDescent="0.25">
   <c r="A6" t="inlineStr">
    <is>
     <t>
      [comp.title;block=tbs:row]
     </t>
    </is>
   </c>
   <c r="B6" t="inlineStr">
    <is>
     <t xml:space="preserve">
     </t>
    </is>
   </c>
  </row>
</sheetData>
<pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>
<pageSetup paperSize="0" orientation="portrait" r:id="rId1"/>
<drawing r:id="rId2"/>
</worksheet>* Deleted files in the archive: none* Added files in the archive: none* Modified files in the archive:xl/sharedStrings.xmlxl/worksheets/sheet1.xml
By: cris
Date: 2015-01-20
Time: 15:31

Re: Dynamic cell

any idea?
By: Skrol29
Date: 2015-01-21
Time: 22:41

Re: Dynamic cell

Hi

I guess you have manually loaded the subfile "xl/sharedStrings.xml".
You may not do this because OpenTBS do manage the file for you.
By: cris
Date: 2015-02-05
Time: 09:04

Re: Dynamic cell

indeed thx