R4R
Right Place For Right Person TM
 
R4R Java Java APIs POI POI FAQs POI Subjective Questions and Answers

 


Tolal:15 Click: 1
Previous Home Next

POI Interview Questions And Answers

Page 1

Ques: 1 
How to find the name of the excel sheet?

Ans:
we know that for using to Event of POI we are constructing an instance of org.apache.poi.hssf.eventmodel.HSSFRequest. and for registering a class we have to create listenerorg.apache.poi.hssf.eventmodel.HSSFListener interface and useHSSFRequest.addListener(yourlistener, recordsid) method. The record sid should be a static reference number (such as BOFRecord.sid) contained in the classes in org.apache.poi.hssf.record.Alternatively we can call HSSFRequest.addListenerForAllRecords(mylistener). if we can register in listeners in the HSSFRequest object successfully we can construct an instance oforg.apache.poi.poifs.filesystem.FileSystem and pass it our XLS file as inputstream. We can either pass this, along with the request we constructed, to an instance of HSSFEventFactory via theHSSFEventFactory.processWorkbookEvents(request, Filesystem) method, Once we make this call, the listeners that we constructed receive calls to their processRecord(Record) methods with each Record they are registered to listen for until the file has been completely read.

Ques: 2 How to described the method Setsheetname?

Ans:
This method is used to detect the automatically unicode and sets its encoding appropriately. Simply we can use the setSheetName(int sheet, String encoding) method. this has the facility to set the unicode for setting encoding appropriately.

Ques: 3 How to find the record using poi?

Ans:
In this page of the tutorials we are trying to find records of an excel sheet using POI2.5 API Event. The class RowRecordextends Record implements Comparable. in this program it class is store the row information for the sheet.

Ques: 4 
Described the method getFirstCol? 

Ans:
This methods get the first column number for the sheet.

Ques: 5 Described the method getLastCol?

Ans:
This methods get the last col number for the sheet.

Ques: 6 
How to find the value of the column?

Ans:
The org.apache.poi.hssf.record.NumberRecord class extends Record and implements CellValueRecord interface, java.lang.Comparable interface.

Ques: 7 How to Find String Values of Cell Using POI?
         

Ans:
we are going to find the String Values of Cell of an excel sheet using POI2.5.0 API Event. The class org.apache.poi.hssf.record.LabelSSTRecord extends Record implements CellValueRecordinterface and java.lang.Comparable. this is used to make reference of a string and a column value.

Ques: 8 
Described the method getSSTIndex?

Ans:
This method is used to give the index in the SSTRecord. and The return type of this getSSTIndex() method is integer (index of string in the SST Table).

Ques: 9 
Described the method getString(int i)?

Ans:
This method is used to get the string value from SSTRecord .

Ques: 10 
described the method getType()?

Ans:
This method is used to find type of object that is marked. This method returns short type of object.

Ques: 11 
How to change the background of the slide?

Ans:
we creates an object of the shape. In this object of the shape we are assigning rectangle shape and set the size and position. Initial values for x and y axis are 0.The height and width are 400 and 400 respectively. Then create an object of Shape and set values, fill type, background color and foreground color of the slide. Then finally add into slide. We are using setFillType(Fill.FILL_SHADE) method to set fill type, setBackgroundColor(Color.blue)method to set background color and setForegroundColor(Color.green) method to set the text color.

Ques: 12 
How to set picture as background of slide?

Ans:
we are going to take a slide. In this slide we are set the background in the slide by inserting the picture. To set the picture as background in slide we are using setPictureData(nameofpicture ) method. We are setting the pattern type of the picture. To set the pattern we are usingsetFillType(filltype) method.

Ques: 13 
Described the method addPicture(byte[] pictureData,int format)?

Ans:
This methods add a picture to the workbook and the return type is int of this method. In This method two parameters are passed into this method. The first parameter is pictureData and second parameter is format .The pictureData is byte form of the picture. In this example we are using Picture.PNG as format.

Ques: 14 
How to change the background of the master slide?

Ans:
firstly we are going to creating a master slide for the slide show. To create slide show we are using SlideShow constructor and to create master slide we are using SlideMaster constructor. After the creation of the masterslide we are going to create the fill. this is used for setting background and for adding a picture. then We are using getFill() method to create the fill object. The setFillType(type) is used allow to set the type of fill. In this program, we are using picture type. Finally we are adding the picture into master slide in fill.

Ques: 15 
How to change power point slide size?

Ans:
setPageSize(java.awt.Dimension pgsize):- This methods provide the feature of for change the size current page. The page size range passed as parameter in this method. The return type is void. This method is defined as public in SlideShow class.


Goto Page:

1
Share |

POI Objective

POI Objective Questions And Answers

POI Interview Questions And Answers

POI Interview Questions And Answers

R4R,POI Objective, POI Subjective, POI Interview Questions And Answers,POI,POI Interview,POI Questions ,POI Answers

New Updates

R4R
R4R
R4R
R4R
R4R
R4R
R4R
R4R