Javascript code to read the contents of the local Excel file:
Required conditions:
1. The client must install the Microsoft Excel activex control (just install the full version of Microsoft office), and allow it to run when the browser pops up the prompt "This website needs to run the following add-ons...", otherwise js code will error when creating Excel.Application object.
2. JS reading local Excel files involves security issues. The Microsoft Excel activex control does not have execution permissions under the default settings. The solution is as follows:
a. Click the browser "Tools" -> "Internet Options" -> "Security" and select "Trusted Sites".
b. Click the "Site (S)" button to add this website to the list;
c. Click "Custom Level (C)..." and find "ActiveX Controls and Plug-ins" in the security settings Under the "Initialize and script ActiveX controls not marked as safe for scripting" node, set it to "Enabled".