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



我正在尝试将一个带状数据复制到 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 中时,它会打印为表格的一行。

我认为只有这种方式

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

最新更新