- Apache POI Tutorial
- Apache POI - Home
- Apache POI - Overview
- Apache POI - Java Excel APIs
- Apache POI - Environment
- Apache POI - Core Classes
- Apache POI - Workbooks
- Apache POI - Spreadsheets
- Apache POI - Cells
- Apache POI - Fonts
- Apache POI - Formula
- Apache POI - Hyperlink
- Apache POI - Print Area
- Apache POI - Database
- Apache POI Resources
- Apache POI - Questions & Answers
- Apache POI - Quick Guide
- Apache POI - Useful Resources
- Apache POI - Discussion
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.
Q 1 - Which of the following is correct about HWPF component of Apache POI?
A - It is used to read and write xls format of MS-Excel files.
B - It is used for xlsx file format of MS-Excel.
C - It is used to extract property sets of the MS-Office files.
D - It is used to read and write doc extension files of MS-Word.
Answer : D
Explanation
HWPF (Horrible Word Processor Format) - It is used to read and write doc extension files of MS-Word.
Q 2 - Which of the following is correct about HSSFSheet class in Apache POI?
A - This is a class under the org.apache.poi.hssf.usermodel package.
B - It can create excel spreadsheets.
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.
Q 3 - Which of the following is correct about XSSFRow class in Apache POI?
A - This is a class under the org.apache.poi.xssf.usermodel package.
B - It implements the Row interface, therefore it can create rows in a spreadsheet.
Answer : C
Explanation
XSSFRow is a class under the org.apache.poi.xssf.usermodel package. It implements the Row interface, therefore it can create rows in a spreadsheet.
Q 4 - Which of the following is correct about XSSFCreationHelper class in Apache POI?
A - This is a class under the org.apache.poi.xssf.usermodel package.
B - It is used as a support class for formula evaluation and setting up hyperlinks.
Answer : D
Explanation
XSSFCreationHelper is a class under the org.apache.poi.xssf.usermodel package. It implements the CreationHelper interface. It is used as a support class for formula evaluation and setting up hyperlinks.
Q 5 - Which of the following is a valid way to compute sum in a formula cell?
A - cell.setCellValue("SUM(C2:C3)")
B - cell.setCellValue("ADD(C2:C3)")
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)")
Answer : C
Explanation
cell.setCellValue("SQRT(C2)") method is used to compute square root in a formula cell.