Question: i am creating an angular table using this example from angular material <https://material.angular.io/components/table/overview> is there anyway to export it in excel or pdf?

Answer: 
You can use [mat-table-exporter](https://www.npmjs.com/package/mat-table-exporter) package to export in excel, csv, json or txt formats. It supports paginated tables too.

Stackblitz demo:
<https://stackblitz.com/edit/mte-demo>
You can use mat-table-exporter. To access the "export" method in the typescript code:

```
@ViewChild("exporter") exporter! : MatTableExporterDirective;

<table mat-table matTableExporter [dataSource]="dataSource" 
                               #exporter="matTableExporter">

```