是否有任何可能使用POI庫和Java改進對excel文件的讀寫? 現在我的代碼看起來像這樣:讀寫Excel文件的改進[POI,Java]
//Reading a file
FileInputStream fin = new FileInputStream(new File(localizationOfExcelFile));
Workbook workbook = new XSSFWorkbook(fin);
//Writing to a file
FileOutputStream fout = new FileOutputStream(new File(localizationOfExcelFile));
workbook.write(fout);
fout.close();
非常感謝!
改進什麼?性能 –
[poi網站](https://poi.apache.org/spreadsheet/quick-guide.html#ReadWriteWorkbook)也一樣。 –
直接使用[File,而不是InputStream](http://poi.apache.org/spreadsheet/quick-guide.html#FileInputStream) - 更快+內存更低 – Gagravarr