使用Angular 10使用js-xlsx读取本地Excel文件? [英] Reading local Excel file with js-xlsx using Angular 10?

查看:655
本文介绍了使用Angular 10使用js-xlsx读取本地Excel文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Angular-CLI前端开发服务器在localhost:4200

I have my Angular-CLI frontend development server running locally on localhost:4200

出于特定原因,我需要获取存储在PC上的本地Excel文件,读取其内容并对API进行一些调用.而且它必须来自客户端.

For specific reasons I need to get a local Excel file stored on my PC, read its content and make some calls to an API. And it must be from the client side.

我正在尝试使用js-xlsx,并随npm install xlsx一起安装了它,但是我找不到如何获取文件和读取其内容的方法.

I'm trying to use js-xlsx, got it installed with npm install xlsx but I can't find how to get the file and read its content.

如何在js-xlsx中导入本地excel文件 角度10?

How can I import a local excel file with js-xlsx in Angular 10?

注意:如果可以/更轻松地使用纯JavaScript,对我来说也是有效的.

推荐答案

此处正在运行

这篇关于使用Angular 10使用js-xlsx读取本地Excel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆