1

我正在使用自定义按钮从 dxDataGrid 导出数据以保存为运行良好的 excel 格式。但是,我想打开文件资源管理器以通过打开文件资源管理器对话框来选择特定的文件夹环境来保存 excel 文件,而不是自动保存在默认下载文件夹中。

这是我的代码,

在 HTML 中,

<button (click)="exportFile()">Export</button>
<dx-data-grid [dataSource]="dataList">.... </dx-data-grid>

在 ts 中,

exportFile() {
    this.grid.export.enabled = true;
    this.grid.export.fileName = 'Report';
    this.grid.instance.exportToExcel(false); // false to export all row data
  }

您能否建议如何打开文件资源管理器对话框以手动将文件保存到特定文件夹?

谢谢

4

0 回答 0