Workbook workbook = null;
Sheet sheet = null;
Cell cell = null;
try {
InputStream is = getBaseContext().getResources().getAssets().open("filename.xls");
workbook = Workbook.getWorkbook(is);
if (workbook != null) {
sheet = workbook.getSheet(0);
if (sheet != null) {
int nRowStartIndex = 1;
int nRowEndIndex = sheet.getColumn(2).length - 1;
int nColumnStartIndex = 0;
int nColumnEndIndex = sheet.getRow(2).length - 1;
//코드삽입
} else {
System.out.println("Sheet is null!!");
}
} else {
System.out.println("WorkBook is null!!");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (workbook != null) {
workbook.close();
}
}
이런 구조로 xls파일의 셀을 불러오는데요
파일크기는 약 1MB입니다.
한번에 불러오는 부분이 여러개다보니 약 1~2초정도 딜레이가 발생되더라구요
(약 2~30초마다 다음 내용으로 넘어가야하는데 딜레이가 너무 눈에띕니다...)
xls 파일을 통째로 램에 상주시켜서 읽는속도를 더 빠르게 할수있을까요??
(안드로이드스튜디오상 cpu이용율이 2~30%이니 읽는속도의 문제같아보입니다)
혹은 다른 해결방법이 있다면 도움 부탁드립니다
감사합니다!