我使用以下api将excel中的数据读取为一个表:https://jtablesaw.github.io/tablesaw/gettingstarted
守则如下:
XlsxReader reader = new XlsxReader();
XlsxReadOptions options = XlsxReadOptions.builder("excel/file_example_XLSX_10.xlsx").build();
try {
tab = reader.read(options);
// System.out.println(tab.print());
} catch (Exception e) {
e.printStackTrace();
}文件file_example_XLSX_10.xlsx的大小约为120 mb,我正在获取OutOfMemoryError。
有没有办法让我只从文件中读取特定的列。
发布于 2020-06-18 09:52:25
我不认为有一种方法只读取某些列,您是否尝试过使用Apache来读取excel?还是在运行时增加内存?
https://stackoverflow.com/questions/62447105
复制相似问题