This sample illustrates how to use HTML and JavaScript to read data using the DOM from Internet Explorer using ActiveX.
http://www.inters.com/samples/JScriptActiveXSample.zip |
You can also run the sample here http://www.inters.com/samples/JScriptActiveXSample/ol.html.
Click Browse, then specify an OL or XLS file on your computer. You can also specify one of the following as the File Name:
http://www.inters.com/samples/JScriptActiveXSample/data/customers.ol
http://www.inters.com/samples/JScriptActiveXSample/data/customers.xlsx (requires Office)
If you have client drivers installer, you can specify a data file or database server:
http://www.inters.com/samples/JScriptActiveXSample/data/odbc.udl (requires an ODBC data source)
http://www.inters.com/samples/JScriptActiveXSample/data/station.sqlite (larger sample that requires SQLite client driver)
http://www.inters.com/samples/JScriptActiveXSample/data/sqlserver_2012.udl (requires SQL Server 2012 client driver)
http://www.inters.com/samples/JScriptActiveXSample/data/oracle_11g.udl (requires Oracle client driver)
Note: After clicking Read Data, if the data connection requires additional input you may need to Alt-Tab to display the window.
A UDL or ODBC datasource that needs additional input (for example, does not specify a default database) may not work.
You can use SQL Offline to create and test UDL files. Use the ODBC Data Source Administrator to create a new data source (Admin menu in the Data tab).