0

I have uploaded a .xls file into mongodb which contains data in sheet1, sheet2 and sheet3. When i downloading a file, i was storing entire workbook contents as ByteArrayInputstream as per our requirement.

Is that possible to read sheet1 data alone from the ByteArrayInputstream ?

Aravindh RS
  • 73
  • 1
  • 3
  • 13
  • 2
    What have you tried so far? [HSSFWorkbook](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html#HSSFWorkbook-java.io.InputStream-) is able reading the workbook from an `Inputstream` and then you can [HSSFWorkbook.getSheetAt](https://poi.apache.org/apidocs/org/apache/poi/hssf/usermodel/HSSFWorkbook.html#getSheetAt-int-). – Axel Richter Feb 06 '18 at 09:01
  • yes i got this already. The problem is how to convert the extracted sheet to new InputStream. If my workbook has Sheet1, sheet2, sheet3 and i can extract each sheets from workbook. I want to store each sheet content as InputStream like Map – Aravindh RS Feb 08 '18 at 07:12

0 Answers0