HXTT excel驱动程序连接问题
我正在使用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()
但是我收到以下exception:
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是否有区别?