简体   繁体   English

如何使用xlsx库在浏览器中解析excel文件

[英]how to use xlsx library to parse excel files within the browser

I'm currently using xlsx library as a node module on the server, to parse Excel files. 我目前正在使用xlsx库作为服务器上的节点模块来解析Excel文件。 From reading XLSX github page, it sounds like xlsx can also be used right within the actual browser to do this parsing without making any xhr calls to the server. 通过阅读XLSX github页面,听起来xlsx也可以在实际的浏览器中直接使用来进行此解析,而无需对服务器进行任何xhr调用。

I could not find any examples of actually doing that. 我找不到实际执行此操作的任何示例。

There is an in-browser parsing demo here: http://oss.sheetjs.com/ 这里有一个浏览器内的解析演示: http : //oss.sheetjs.com/

but I do not see any examples of how that actually done. 但我看不到任何实际效果的示例。

Could someone point me to the right direction, please? 有人可以指出我正确的方向吗?

As it turns out, I was not looking well enough. 事实证明,我看起来还不够好。 I did fine the HTML5 parsing examples right on the github page. 我确实在github页面上对HTML5解析示例进行了完善。 Now, that I'm trying that, I get this "Uncaught SyntaxError: Unexpected token <" error, but I will open a separate question for that. 现在,我正在尝试解决此错误,但出现了“未捕获的SyntaxError:意外的令牌<”错误,但是我将为此提出一个单独的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在 Javascript 中使用 XLSX 库来解析来自特定行的 Excel 文件 - How to use XLSX library in Javascript to parse an Excel file from a particular row 如何从JavaScript生成Excel xlsx文件 - How to generate Excel xlsx files from JavaScript 如何在CasperJS中使用Excel文件(xlsx)的“行元素”? - How to use 'row elements' of excel file(xlsx) in CasperJS? 如何在库中使用 angular 应用程序的库 - How to use a library of an angular application within a library 如何使用浏览器js解析sourcemap - how to use browser js parse sourcemap 如何使用 filereader 和 xlsx 读取大型 excel 文件的一部分以防止浏览器崩溃 - how to read portion of large excel file to prevent browser crashing using filereader and xlsx 如何使用 xlsx npm 库将嵌套的 json 对象转换为 excel 表? - How to convert a nested json object into an excel table using the xlsx npm library? 如何在带有嵌套对象的第三方库上创建间谍-Excel.Workbook.xlsx.WriteFile() - How can I create a spy on a third party library with nested object - Excel.Workbook.xlsx.WriteFile() 如何将js库与webpack捆绑在浏览器中使用? - How to bundle js library for use in browser with webpack? 如何在 Mirth 中读取 xlsx 文件 - How to read xlsx files in Mirth
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM