• Maybe it'll be easier for me to start from the beginning instead and simply understand your end goal, rather than what it is you've tried so far. At the moment you have the data, which you've suipplied in a consumable format (thanks for that!). Now you want to create an email which, I think, should contain something like this..?

    <table border="1">                          
      <tr>                            
       <td>BillRun</td>
       <td>369873</td>
       <td>369874</td>
       <td>369876</td>
       <td>369875</td>
       <td>369877</td>  
       <td>369878</td>  
       <td>369879</td>
      </tr>
      <tr>
       <td>bill_date</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>
      </tr>
      <tr>
       <td>invoice_count</td>  
       <td>6</td>  
       <td>6</td>  
       <td>5</td>  
       <td>3</td>  
       <td>9</td>  
       <td>11</td>  
       <td>1</td>
      </tr>
      <tr>
       <td>BilledDays</td>  
       <td>3047</td>  
       <td>2181</td>  
       <td>6089</td>  
       <td>2931</td>  
       <td>5126</td>  
       <td>3485</td>  
       <td>855</td>
      </tr>
      <tr>
       <td>AgedBilledDays</td>  
       <td>27390</td>  
       <td>27390</td>  
       <td>27390</td>  
       <td>27390</td>  
       <td>27390</td>  
       <td>27390</td>  
       <td>27390</td>
      </tr>
      <tr>  
       <td>MinInvoiceDue</td>  
       <td>-261.24</td>  
       <td>-283.24</td>  
       <td>-149.89</td>  
       <td>-184.63</td>  
       <td>-384.76</td>  
       <td>-577.76</td>  
       <td>605.27</td>
      </tr>
      <tr>  
       <td>MaxInvoiceDue</td>  
       <td>0.03</td>  
       <td>0.03</td>  
       <td>2218.31</td>  
       <td>4270.84</td>  
       <td>2403.05</td>  
       <td>3108.78</td>  
       <td>605.27</td>
      </tr>
      <tr>  
       <td>TotalCurrentInvoiceChargesIncVat</td>  
       <td>1901.24</td>  
       <td>1623.24</td>  
       <td>3059.52</td>  
       <td>4379.66</td>  
       <td>3477.56</td>  
       <td>7870.38</td>  
       <td>159.95</td>
      </tr>
      <tr>  
       <td>TotalDueIncVat</td>  
       <td>-417.61</td>  
       <td>-834.61</td>  
       <td>2039.23</td>  
       <td>6438</td>  
       <td>3079.47</td>  
       <td>4432.59</td>  
       <td>605.27</td>
      </tr>
      <tr>  
       <td>VDDPaymentDate</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>  
       <td>43045.6868055556</td>
      </tr>
    </table>

    This results in a table looking somewhat like this:

    Is my understanding correct?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk