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

问题描述 投票:0回答:1

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

ionic3
1个回答
0
投票
我认为除了这种方式别无其他

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

© www.soinside.com 2019 - 2024. All rights reserved.