小编jen*_*fad的帖子

使用node.js修改现有Excel文件

有没有办法修改node.js中的现有excel文件?我查看了exceljs但它没有提供任何只修改现有数据的功能.好像它会写入新的流.

或者我错过了exceljs的一些东西?

提前致谢.

node.js exceljs

16
推荐指数
2
解决办法
2万
查看次数

安装 angular/cli 时出错 - 未找到:python2

我正在尝试使用此命令“npm install -g @angular/cli”进行安装。

但我总是收到错误“错误:未找到:python2”

有什么我在这里想念的吗?

node.js npm angular-cli

7
推荐指数
2
解决办法
5685
查看次数

Enumerable.Concat在空列表上不起作用

我有下面的代码,该代码从子函数中检索列表并将其返回给主函数。我的问题是我无法将子功能的结果连接到mainfunc中声明的可枚举。我有什么想念的吗?

private void MainFunc()
{
    IEnumerable<CustomClass> keys = Enumerable.Empty<CustomClass>();
    foreach (var item in items)
    {
        keys.Concat(SubFunc(item));
    }
}
private IEnumerable<CustomClass> SubFunc (string y)
{
    IEnumerable<CustomClass> list = GetList(y).ToList();
    return list;
}
Run Code Online (Sandbox Code Playgroud)

c# ienumerable

3
推荐指数
1
解决办法
1690
查看次数

类型“无效”不能分配给对象

export class LoginInfo {
    userName: string;
    password: string;
} 

public getLoginInfo(id: number): Promise<LoginInfo> {
    return this.http.get(this.url + id + '/' + '/loginInfo')
        .toPromise()
        .then(response => response.json() as LoginInfo)
        .catch((error: Response) => {
            this.handleError(error);
        });
}
Run Code Online (Sandbox Code Playgroud)

获得了用于从API控制器检索数据的代码。在ts中进行编译时,总是会出现以下错误:

Type 'Promise<void | LoginInfo>' is not assignable to type 'Promise<LoginInfo>'
Type 'void' is not assignable to type 'LoginInfo'
Run Code Online (Sandbox Code Playgroud)

这是我的软件包版本:

"typescript": "2.5.2",
"@angular/compiler": "4.3.6"
"@angular/compiler-cli": "4.3.6"
Run Code Online (Sandbox Code Playgroud)

typescript

2
推荐指数
1
解决办法
816
查看次数

?? 操作员 - 在一个衬管条件下使用

有人可以解释下面的陈述如何运作.我知道?? 如果第一个参数不为null,则返回第一个参数.但是当我看到它时,我有点困惑?跟随'file'变量.

return file?.ImportStatus ?? ImportStatusEnum.Unknown;
Run Code Online (Sandbox Code Playgroud)

c#

1
推荐指数
2
解决办法
83
查看次数

标签 统计

c# ×2

node.js ×2

angular-cli ×1

exceljs ×1

ienumerable ×1

npm ×1

typescript ×1