<table>
    <tr>
        <td>id</td>
        <td>user</td>
        <td>name</td>
        <td>state_id</td>
        <td>start_shift</td>
        <td>end_shift</td>
        <td>nozzle_1</td>
        <td>nozzle_2</td>
        <td>nozzle_3</td>
        <td>nozzle_4</td>
        <td>nozzle_5</td>
        <td>nozzle_6</td>
        <td>nozzle_7</td>
        <td>nozzle_8</td>
        <td>result_1</td>
        <td>result_2</td>
        <td>result_3</td>
        <td>result_4</td>
        <td>result_5</td>
        <td>result_6</td>
        <td>result_7</td>
        <td>result_8</td>
        <td>total_shift_result</td>
        <td>hand_cash</td>
        <td>card_cash</td>
        <td>total_shift_cash</td>
        <td>flag</td>
        <td>confirm</td>
        <td>save_date</td>
    </tr>
    <% shifts.forEach((d)=>{ %>
    <tr>
        <td><%= d.id %></td>
        <td><%= d.user %></td>
        <td><%= d.name %></td>
        <td><%= d.state_id %></td>
        <td><%= d.start_shift %></td>
        <td><%= d.end_shift %></td>
        <td><%= d.nozzle_1 %></td>
        <td><%= d.nozzle_2 %></td>
        <td><%= d.nozzle_3 %></td>
        <td><%= d.nozzle_4 %></td>
        <td><%= d.nozzle_5 %></td>
        <td><%= d.nozzle_6 %></td>
        <td><%= d.nozzle_7 %></td>
        <td><%= d.nozzle_8 %></td>
        <td><%= d.result_1 %></td>
        <td><%= d.result_2 %></td>
        <td><%= d.result_3 %></td>
        <td><%= d.result_4 %></td>
        <td><%= d.result_5 %></td>
        <td><%= d.result_6 %></td>
        <td><%= d.result_7 %></td>
        <td><%= d.result_8 %></td>
        <td><%= d.total_shift_result %></td>
        <td><%= d.hand_cash %></td>
        <td><%= d.card_cash %></td>
        <td><%= d.total_shift_cash %></td>
        <td><%= d.flag %></td>
        <td><%= d.confirm %></td>
        <td><%= d.save_date %></td>
    </tr>
    <% }) %>
</table>
<a href="/lastreport.xlsx" >
    <button style="margin: 10px;">دانلود</button>
</a>