Jexcel

Java Excel API Projects

Java Excel API Project 1

Working with different types of Cell.
Previous Home Next

 

In this we are going to explain how we can work with different types of cells .

The WritableCell ,is a public interface , has supper interface Cell Interface.
Cell interface, public interface, represents an individual Cell within a Sheet. It may be used to get or set the information about cells types and other details.
 
Following are classes which implements WritableCell interface and used to create different types of cells.
 
EmptyCell, CellValue, Formula, Boolean, Number, Label, DateTime, Blank

EmptyCell:-
The EmptyCell class is used to create an empty cell.
 
CellValue:-
This class is used to create a cell which stores the common data used for cells, such as row, column and formatting information. Any record which directly represents the contents of a cell, such as labels, date and numbers, are derived from this class data store .

Formula:-
This class is used to create a cell which contains a numerical value 

Number:-
This class is used to create a cell which contains a numerical value 

Label:-
This class is used to create a cell which containing text 

Blank:-
This class is used to create a cell which blank cell. 

Syntax :-
//Create the label cell with specifying content 

Label label = new Label(0, 2, "A label "); 
sheet.addCell(label); 

//Create the number cell with specifying number  

Number number = new Number(3, 4, 3.1459); 
sheet.addCell(number);
 

 

Previous Home Next