Reading Excel file (.xls) in Java

I want to read text from excel file in J2SE using NetBeans. I found an article here about using Apache POI and JExcelApi, but I would prefer not depending on external packages. if possible, using only built-in Java packages.

It almost worked, but it gives me an exception error:

java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Do I need to install any ODBC driver (if so, which driver and how to install it)? What is the easiest way to solve this problem? please help, thanks in advance

+3
source share
4 answers

, Excel Java :
1) excel ODBC.
2) JDBC-ODBC Excel, JDBC api.

, :
1) ODBC , " ".
2) Jar JDBC-ODBC , , " ". Google . .

+7

ODBC, Excel . ODBC Windows .

+2

I made a small application that read very quickly in an Excel worksheet in a JTable model. I think you should reconsider your use of external libraries.

+2
source

If you just want to read the data, the best option is to convert the XLS file to the CSV file format.

+2
source

Source: https://habr.com/ru/post/1721542/


All Articles