本文整理汇总了TypeScript中app/core/ui-services/file-export.service.FileExportService类的典型用法代码示例。如果您正苦于以下问题:TypeScript service.FileExportService类的具体用法?TypeScript service.FileExportService怎么用?TypeScript service.FileExportService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了service.FileExportService类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: downloadCsvExample
/**
* Triggers an example csv download
*/
public downloadCsvExample(): void {
const headerRow = [
'Title',
'Given name',
'Surname',
'Structure level',
'Participant number',
'Groups',
'Comment',
'Is active',
'Is present',
'Is a committee',
'Initial password',
'Email'
]
.map(item => this.translate.instant(item))
.join(',');
const rows = [
headerRow,
'Dr.,Max,Mustermann,"Berlin",1234567890,"Delegates, Staff",xyz,1,1,,initialPassword,',
',John,Doe,Washington,75/99/8-2,Committees,"This is a comment, without doubt",1,1,,,[email protected]',
',Fred,Bloggs,London,,,,,,,,',
',,Executive Board,,,,,,,1,,'
];
this.exporter.saveFile(rows.join('\n'), this.translate.instant('participants-example') + '.csv', 'text/csv');
}
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:29,代码来源:user-import-list.component.ts
示例2: downloadCsvExample
/**
* Triggers an example csv download
*/
public downloadCsvExample(): void {
const headerRow = ['Title', 'Text', 'Duration', 'Comment', 'Internal item']
.map(item => this.translate.instant(item))
.join(',');
const rows = [
headerRow,
'Demo 1,Demo text 1,1:00,test comment,',
'Break,,0:10,,internal',
'Demo 2,Demo text 2,1:30,,hidden'
];
this.exporter.saveFile(rows.join('\n'), this.translate.instant('Topic example') + '.csv', 'text/csv');
}
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:15,代码来源:agenda-import-list.component.ts
示例3: exportDummyMotion
public exportDummyMotion(): void {
const headerRow = ['Identifier', 'Title', 'Text', 'Reason', 'Submitters', 'Category', 'Origin', 'Motion block']
.map(item => this.translate.instant(item))
.join(',');
const rows = [
headerRow,
'A1,Title 1,Text 1,Reason 1,Submitter A,Category A,"Last Year Conference A", Block A',
'B1,Title 2,Text 2,Reason 2,Submitter B, Category B,, Block A',
',Title 3, Text 3,,,,,'
];
this.fileExport.saveFile(rows.join('\n'), this.translate.instant('motions-example') + '.csv', 'text/csv');
}
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:12,代码来源:motion-csv-export.service.ts
示例4: exportDummyCSV
/**
* Exports a short example file
*/
public exportDummyCSV(): void {
const headerRow = ['Title', 'Text'].map(item => this.translate.instant(item)).join(',');
const rows = [
headerRow,
'ยง1,"This is the first section"',
'"ยง1, A 3", "This is another important aspect"',
'ยง2,Yet another'
];
this.fileExport.saveFile(
rows.join('\n'),
`${this.translate.instant('Statute')}-${this.translate.instant('example')}.csv`,
'text/csv'
);
}
开发者ID:jwinzer,项目名称:OpenSlides,代码行数:17,代码来源:statute-csv-export.service.ts
注:本文中的app/core/ui-services/file-export.service.FileExportService类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论