Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two tables in the same page produces csv with trailing space and space at the end of each column #107

Open
pantonis opened this issue Apr 14, 2021 · 0 comments
Labels

Comments

@pantonis
Copy link

pantonis commented Apr 14, 2021

I have a page that I have two tables. When I click export button

  <button type="button" class="btn btn-success export-button"                           
                                (click)="exporter.exportTable('csv', {fileName:'Statistics Accounts'})"
                                [busyText]="'Exporting'" [buttonBusy]="exporting">
                                <i class="fas fa-file-excel"></i>
                                Export
                            </button>
   <table mat-table [dataSource]="dataSource" #TableAccountSort="matSort" matSort
                                    matSortActive="AccountNumber" matSortDisableClear="true" matTableExporter
                                    #exporter="matTableExporter" (exportStarted)="exporting = true"
                                    (exportCompleted)="exporterValues.exportTable('csv', {fileName:'Accounts '})">

and the second table

 <table mat-table [dataSource]="dataSourceValues" #TableAccountValuesSort="matSort"
                                    matSort matSortActive="AccountNumber" matSortDisableClear="true" matTableExporter
                                    #exporterValues="matTableExporter" (exportCompleted)="exporting = false">

I get two files. When I open both files I can see that the second file has trailing spaces on all columns headers and trailing spaces and space at the end on all column values

Why is that happening

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants