我在Visual Studio 2017中使用AngularJS创建了一个.Net Core项目,但是当我尝试创建服务时,我收到错误
对装饰器的实验性支持是一个在将来的版本中可能会发生变化的功能.设置'experimentalDecorators'选项`以删除此警告.
我检查了几个链接,例如编辑tsconfig.json以及link1和link2等链接
现在我的tsconfig.json如下所示
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"experimentalDecorators": true,
"allowJs": true,
"noEmit": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2017",
"dom"
]
},
"include": [
"app/**/*"
],
"files": [], //add a "files" array (in my case empty)
"exclude": [
"node_modules"
],
"typeAcquisition": {
"enable": true // helps fuel better js intellisense
}
}
Run Code Online (Sandbox Code Playgroud)
但我仍然看到错误,现在我一无所知.
我试图通过将标题数组传递给选项来更改标题标题,但它不会覆盖标题。相反,它会在原始数据之前插入新的标头。我传递了相同数量的标题。
这是我的代码:
const ws: XLSX.WorkSheet = XLSX.utils.json_to_sheet(
json,
{header: headerColumns}
);
const wb: XLSX.WorkBook = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Transactions');
const excelBuffer: any = XLSX.write(wb, { bookType: 'xlsx', type: 'array' });
this.saveAsExcelFile(excelBuffer, excelFileName);
Run Code Online (Sandbox Code Playgroud)
输出如下所示:
我有多个包含数据的数据表,我想将它们添加到带有空格的单张纸中。我正在使用 ClosedXML 开发导出 excel 实用程序。