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

Ionic v3: How to copy ion-grid table to excel

我正在尝试将 girded 数据复制到 excel 作为 table。

这是我的代码

<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>

当我将 table 粘贴到 excel 时,它打印为一行 table。

我觉得没有别的办法了

<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>