Example:
//Instantiating a Workbook object
//Instantiating a Workbook object
$workbook = new cells\Workbook();
//Obtaining the reference of the newly added worksheet by passing its sheet index
$worksheet = $workbook->getWorksheets()->get(0);
//Accessing the "A1" cell from the worksheet
$cell = $worksheet->getCells()->get("A1");
//Adding some value to the "A1" cell
$cell->putValue("Hello Aspose!");
$style = $cell->getStyle();
$font = $style->getFont();
//Setting the font name to "Times New Roman"
$font->setName("Times New Roman");
//Setting font size to 14
$font->setSize(14);
//setting font color as Red
$font->setColor(cells\Color::getRed());
$cell->setStyle($style);
| Property Getters/Setters Summary | ||
|---|---|---|
function | getArgbColor() | |
function | setArgbColor(value) | |
| Gets and sets the color with a 32-bit ARGB value. | ||
function | getCapsType() | |
function | setCapsType(value) | |
| Gets and sets the text caps type. The value of the property is TextCapsType integer constant. | ||
function | getCharset() | |
function | setCharset(value) | |
| Represent the character set. | ||
function | getColor() | |
function | setColor(value) | |
|
Gets or sets the |
||
function | getDoubleSize() | |
function | setDoubleSize(value) | |
| Gets and sets the double size of the font. | ||
function | isBold() | |
function | setBold(value) | |
| Gets or sets a value indicating whether the font is bold. | ||
function | isItalic() | |
function | setItalic(value) | |
| Gets or sets a value indicating whether the font is italic. | ||
function | isNormalizeHeights() | |
function | setNormalizeHeights(value) | |
| Indicates whether the normalization of height that is to be applied to the text run. | ||
function | isStrikeout() | |
function | setStrikeout(value) | |
| Gets or sets a value indicating whether the font is single strikeout. | ||
function | isSubscript() | |
function | setSubscript(value) | |
| Gets or sets a value indicating whether the font is subscript. | ||
function | isSuperscript() | |
function | setSuperscript(value) | |
| Gets or sets a value indicating whether the font is super script. | ||
function | getName() | |
function | setName(value) | |
|
Gets or sets the name of the |
||
function | getSchemeType() | |
function | setSchemeType(value) | |
| Gets and sets the scheme type of the font. The value of the property is FontSchemeType integer constant. | ||
function | getScriptOffset() | |
function | setScriptOffset(value) | |
| Gets and sets the script offset,in unit of percentage | ||
function | getSize() | |
function | setSize(value) | |
| Gets or sets the size of the font. | ||
function | getStrikeType() | |
function | setStrikeType(value) | |
| Gets the strike type of the text. The value of the property is TextStrikeType integer constant. | ||
function | getThemeColor() | |
function | setThemeColor(value) | |
| Gets and sets the theme color. | ||
function | getUnderline() | |
function | setUnderline(value) | |
| Gets or sets the font underline type. The value of the property is FontUnderlineType integer constant. | ||
| Method Summary | ||
|---|---|---|
function | equals(font) | |
Checks if two fonts are equals.
|
||
function | toString() | |
Returns a string represents the current Cell object.
|
||
function getCharset() / function setCharset(value)
function isItalic() / function setItalic(value)
function isBold() / function setBold(value)
function getCapsType() / function setCapsType(value)
function getStrikeType() / function setStrikeType(value)
function isStrikeout() / function setStrikeout(value)
function getScriptOffset() / function setScriptOffset(value)
function isSuperscript() / function setSuperscript(value)
function isSubscript() / function setSubscript(value)
function getUnderline() / function setUnderline(value)
function getName() / function setName(value)
Example:
$workbook = new cells\Workbook();
//Obtaining the reference of the newly added worksheet by passing its sheet index
$worksheet = $workbook->getWorksheets()->get(0);
//Accessing the "A1" cell from the worksheet
$cell = $worksheet->getCells()->get("A1");
//Adding some value to the "A1" cell
$cell->putValue("Hello Aspose!");
$style = $cell->getStyle();
$font = $style->getFont();
$font->setName("Times New Roman");
$cell->setStyle($style);function getDoubleSize() / function setDoubleSize(value)
function getSize() / function setSize(value)
function getThemeColor() / function setThemeColor(value)
function getColor() / function setColor(value)
function getArgbColor() / function setArgbColor(value)
function isNormalizeHeights() / function setNormalizeHeights(value)
function getSchemeType() / function setSchemeType(value)