Do I need to have Excel installed to query spreadsheets using an OleDB Provider?

最后都变了- 提交于 2019-11-27 03:38:51

问题


I am working on some software that uses an OleDB to open a .xls file, query some data, and fill a dataset with the results. I am now looking at using this software on systems that do not have Excel. Will my software still be able to read the spreadsheets?

This xls file contains 1000s of configuration settings that my software uses. If this setup won't work on computers without Excel, I'm guessing my next best move is to convert the xls file to an XML file and read it in using XML Services.


回答1:


You don't have to have office or the office data connectivity installed, you can use the Jet for OleDB engine which is installed on pretty much every windows machine in existence. However it's very old technology and is limited to 32 bit.

http://msdn.microsoft.com/en-us/library/ms175866.aspx

If you want to avoid this mess entirely then switch over to an app.config file or a properties file and you can get the pure .net solution.




回答2:


You need either the full Office or the Office Data Connectivity Components installed on the client computers.



来源:https://stackoverflow.com/questions/3971900/do-i-need-to-have-excel-installed-to-query-spreadsheets-using-an-oledb-provider

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!