<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Building Table in DOCX with N number of ROW&amp;#39;S</title><link>https://community.appian.com/discussions/f/plug-ins/38992/building-table-in-docx-with-n-number-of-row-s</link><description>I need to create a dynamic DOCX document that includes a table with 11 columns, where each column should automatically adjusts its width. 
 I have attached a code snippet that generates a DOCX document with a table showing only 8 columns. The remaining</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Building Table in DOCX with N number of ROW'S</title><link>https://community.appian.com/thread/150103?ContentTypeID=1</link><pubDate>Sat, 19 Jul 2025 03:58:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:b28567c7-542b-4744-a254-eab6c96cf57f</guid><dc:creator>Shubham Aware</dc:creator><description>&lt;p&gt;I&amp;#39;ve adjusted the column widths to fit all 11 columns on the page - gave more space to Description and Remarks since they usually have more text, and squeezed the smaller ones like Qty and Spare. Should work now&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;div style=&amp;#39;width: 100%;&amp;#39;&amp;gt;
&amp;lt;table class=&amp;#39;table-solid-border&amp;#39; style=&amp;#39;table-layout: fixed; width: 100%; border-collapse: collapse;&amp;#39;&amp;gt;
&amp;lt;thead&amp;gt;
&amp;lt;tr&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 7%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;SAP Number&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 8%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Part Number&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 14%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Description&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 10%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Manufacturer&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 7%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Group&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 5%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Spare&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 4%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Qty&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 8%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Delivery Date&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 8%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Price&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 8%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Total&amp;lt;/th&amp;gt;
&amp;lt;th class=&amp;#39;table-solid-border budget-profile-table-header&amp;#39; style=&amp;#39;width: 21%; font-size: 8px; padding: 2px; text-align: center;&amp;#39;&amp;gt;Remarks&amp;lt;/th&amp;gt;
&amp;lt;/tr&amp;gt;
&amp;lt;/thead&amp;gt;
&amp;lt;tbody style=&amp;#39;background-color: ghostwhite;&amp;#39;&amp;gt;&amp;quot;,
            a!forEach(
              items: local!selectedEquipments,
              expression: concat(
                &amp;quot;&amp;lt;tr&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; fv!item.sapnumber &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; fv!item.partnumber &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: left; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; fv!item.description &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; if(
                  a!isNotNullOrEmpty(fv!item.manufacturer),
                  fv!item.manufacturer,
                  &amp;quot;--&amp;quot;
                ) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; fv!item.group &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center;&amp;#39;&amp;gt;&amp;quot; &amp;amp; if(fv!item.spare, &amp;quot;Yes&amp;quot;, &amp;quot;No&amp;quot;) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center;&amp;#39;&amp;gt;&amp;quot; &amp;amp; fv!item.qty &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: center;&amp;#39;&amp;gt;&amp;quot; &amp;amp; text(
                  todate(fv!item.deliverydate),
                  &amp;quot;dd/mm/yy&amp;quot;
                ) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: right;&amp;#39;&amp;gt;&amp;quot; &amp;amp; a!currency(isoCode: &amp;quot;USD&amp;quot;, value: fv!item.cadprice) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: right;&amp;#39;&amp;gt;&amp;quot; &amp;amp; a!currency(isoCode: &amp;quot;USD&amp;quot;, value: fv!item.pricetotal) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;td class=&amp;#39;budget-profile-table-column-value table-solid-border&amp;#39; style=&amp;#39;font-size: 7px; padding: 2px; text-align: left; word-wrap: break-word;&amp;#39;&amp;gt;&amp;quot; &amp;amp; if(
                  a!isNotNullOrEmpty(fv!item.remarks),
                  fv!item.remarks,
                  &amp;quot;--&amp;quot;
                ) &amp;amp; &amp;quot;&amp;lt;/td&amp;gt;&amp;quot;,
                &amp;quot;&amp;lt;/tr&amp;gt;&amp;quot;
              )
            ),
            &amp;quot;&amp;lt;/tbody&amp;gt;&amp;lt;/table&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;br&amp;gt;&amp;lt;/br&amp;gt;&amp;quot;,
            
          )
        )
      )
    ),
    &amp;quot;&amp;lt;/div&amp;gt;&amp;quot;,&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Building Table in DOCX with N number of ROW'S</title><link>https://community.appian.com/thread/150100?ContentTypeID=1</link><pubDate>Fri, 18 Jul 2025 20:48:55 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a4b80b6-3782-4561-8734-6169b5eafd99</guid><dc:creator>kapilsharma</dc:creator><description>&lt;p&gt;Hi &lt;a href="/members/rishukumarg1965"&gt;Rishu Kumar Gupta&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Can you try adding the below mentioned line to your code and let me know if that works ?&lt;br /&gt;I was facing a similar issue and it worked for me. I hope it work for you&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;  &amp;lt;table class=&amp;#39;table-solid-border&amp;#39; style=&amp;#39;width: 100%; table-layout: auto; border-collapse: collapse; font-size: 10px;&amp;#39;&amp;gt;&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>