java - Out of memory when reading xls with Apache poi on Android -
this question has answer here:
- how load large xlsx file apache poi? 6 answers
i'm attempting create basic spreadsheet (xls) viewer android. while using apache poi api i'm getting out of memory errors when creating new xssfworkbook object:
mworkbook = new xssfworkbook(file);
how can grab specific rows/cells inside .xls without loading entire file memory?
spreadsheets aren't ideal random access. reason why spreadsheets aren't designed purposed because cells can arbitrarily long, , rows can have arbitrary number of cells in them. if not case , each row had fixed size in bytes, skip reading first (rowsize * indexofrow)
bytes of file.
if random access primary use case recommend loading data small database. take @ h2.
Comments
Post a Comment