ng-material-extensions icon indicating copy to clipboard operation
ng-material-extensions copied to clipboard

Is it possible to export multiple tables?

Open andreElrico opened this issue 4 years ago • 4 comments

Is it possible to have like a dialog to chose "m" of "n" mat-tables and export those "m" different table data into 1 xlsx with m named sheets? How could we construct something like this?

andreElrico avatar Oct 17 '19 10:10 andreElrico

Unfortunately currently it is not possible. I'll label this as a feature request. I assume we can provide this feature sometime in the future through a service. Thanks for communicating.

HalitTalha avatar Oct 18 '19 08:10 HalitTalha

@andreElrico I managed to do that by calling each exporter

<button type="button" class="buttonExport" (click)="table1Exporter.exportTable('csv', {fileName:'Table 1'});table2Exporter.exportTable('csv', {fileName:'Table 2'})">
	<i class="fas fa-file-excel"></i>
	Export
</button>

pantonis avatar Jun 25 '20 08:06 pantonis

@andreElrico I managed to do that by calling each exporter

<button type="button" class="buttonExport" (click)="table1Exporter.exportTable('csv', {fileName:'Table 1'});table2Exporter.exportTable('csv', {fileName:'Table 2'})">
	<i class="fas fa-file-excel"></i>
	Export
</button>

It looks like it's not one file in XLSX format with 2 sheets you are getting in the end.

znotdead avatar Oct 23 '20 01:10 znotdead

@andreElrico Yes, this is what I ended up using as well. But in my situation, sometimes I'm using multiple tables to display information in a custom format, but I'd like to export as a single sheet. Any way to combine the datasources perhaps?

chriszrc avatar Dec 23 '21 16:12 chriszrc