Apache POI - Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Apache POI. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Answer : A

Explanation

HSSF (Horrible Spreadsheet Format) - It is used to read and write xls format of MS-Excel files.

Answer : D

Explanation

HSSFSheet class is a class under the org.apache.poi.hssf.usermodel package. It can create excel spreadsheets and it allows to format the sheet style and sheet data.

Answer : D

Explanation

HSSFColor is a class under the org.apache.poi.hssf.util package. It provides different colors as nested classes. Usually these nested classes are represented by using their own indexes. It implements the Color interface.

Q 4 - Which of the following type of cell represents number cell in Apache POI?

A - XSSFCell.CELL_TYPE_NUMERIC

B - XSSFCell.CELL_NUMERIC

C - XSSFCell.NUMERIC

D - None of the above.

Answer : A

Explanation

XSSFCell.CELL_TYPE_NUMERIC represents number cell in Apache POI.

Answer : A

Explanation

cell.setCellValue("SUM(C2:C3)") method is used to compute sum in a formula cell.

Q 6 - Which of the following is a valid way to compute square root in a formula cell?

A - cell.setCellValue("SQUARE_ROOT(C2)")

B - cell.setCellValue("SQUARE(C2)")

C - cell.setCellValue("SQRT(C2)")

D - None of the above.

Answer : C

Explanation

cell.setCellValue("SQRT(C2)") method is used to compute square root in a formula cell.

apache_poi_questions_answers.htm
Advertisements