简体   繁体   English

如何使用HTML / JavaScript表单在Excel文件中进行搜索

[英]How to search inside excel file using HTML/JavaScript form

I have an excel file that contains around 3000 unique ids. 我有一个Excel文件,其中包含大约3000个唯一ID。 I am creating a HTML form where the user will select a code from one of these ids. 我正在创建一个HTML表单,用户将在其中从这些ID中选择一个代码。 Similar to something where they click on the code field, which takes them to a new web page where they can either search a specific code or just select to show all and then manually select one code. 类似于他们单击“代码”字段的操作,这会将他们带到一个新的网页,在该网页中,他们可以搜索特定代码,也可以选择全部显示,然后手动选择一个代码。

I am assuming that I need to use JavaScript or something similar over here to connect the excel file to the form, but I cannot find a specific answer to the question. 我假设我需要在这里使用JavaScript或类似的东西将excel文件连接到表单,但是我找不到该问题的具体答案。 I have seen a lot of websites like job application websites where they have you search for the university do something similar. 我见过很多网站,例如求职网站,在这些网站上您搜索大学时都做类似的事情。 But I am not sure where to begin. 但是我不确定从哪里开始。 It would be great if someone pushed me into the right direction. 如果有人将我推向正确的方向,那就太好了。

Javascript on the frontend (in a web browser) does not have access to the filesystem. 前端(在Web浏览器中)的Javascript无法访问文件系统。 You should use NodeJS (Javascript Runtime) which does run on the server side, and therefore has access to the filesystem. 您应该使用确实在服务器端运行的NodeJS(Javascript运行时),因此可以访问文件系统。

Your specific issues can be solved with a simple HTTP GET or POST request to a small NodeJS server which will take the code as a query parameter and proceed according to the requirements you have. 您可以通过对小型NodeJS服务器的简单HTTP GET或POST请求来解决您的特定问题,该服务器将代码作为查询参数并根据您的要求进行操作。

I hope this helps. 我希望这有帮助。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM