离子v3:如何将离子网格表复制到excel

时间:2020-05-14 18:51:38

标签: ionic3

我正在尝试将束状数据复制为表格的excel。

这是我的代码

<ion-grid>
   <ion-row *ngFor="let row of ['', '', '', '', '', '']; let i=index;">
      <ion-col col-3 *ngFor="let col of ['', '', '', '']; let j=index;" style="border:1px solid black;">
        TEST {{i}}.{{j}}
      </ion-col>
   </ion-row>
</ion-grid>

当我将表格粘贴到excel中时,它将打印为表格的一行。

1 个答案:

答案 0 :(得分:1)

我认为没有别的办法

<table width="100%">
  <tr *ngFor="let row of ['', '', '', '', '', '']; let i=index;">
    <td text-center *ngFor="let col of ['', '', '', '']; let j=index;" style="border:1px solid black;">
      TEST {{i}}.{{j}}
    </td>
  </tr>
</table>