Download Excel file with Angular

源码连接(编写中)

用Angular下载后台返回的Excel文件,用Blob实现,引用FileSaver.js 

 后台C#代码:

[WebMethod]
public static byte[] Calculate()
{
    byte[] data = File.ReadAllBytes(@"C:\test.xls");

    return data;            
}

View Code

Related Posts

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注