HXTT excel驱动程序连接问题

时间:2016-10-13 09:00:06

标签: java excel tomcat7 hxtt

我正在使用HXTT excel驱动程序从excel文件中获取数据。 数据目录不在运行Java程序的Windows机器中,而是在IMB机器中的那些Excel文件。

让我们说IBM上的excel文件位于//MyApp/folder/data.xlsx中。我正在尝试以下方式连接:

BasicDataSource dataSource = new BasicDataSource();
dataSource.setDriverClassName(com.hxtt.sql.excel.ExcelDriver);
dataSource.setUrl("jdbc:excel://///MyApp/folder/data.xlsx?maxScanRows=31");
Connection connection = dataSource.getConnection()

但是我得到以下例外:

org.apache.commons.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (//MyApp/folder/data.xlsx doesn't exist or can't be accessed. If you're using mapped drives to access database files, you may need to check the security permissions.)

连接IBM机器时,URL有什么不同吗?

0 个答案:

没有答案