private function Excel_XML::addRow in Views Excel Export 6
Same name and namespace in other branches
- 7 libs/php-excel.class.php \Excel_XML::addRow()
Add row
Adds a single row to the document. If set to true, self::bConvertTypes checks the type of variable and returns the specific field settings for the cell.
Parameters
array $array One-dimensional array with row content:
1 call to Excel_XML::addRow()
- Excel_XML::addArray in libs/
php-excel.class.php - Add an array to the document
File
- libs/
php-excel.class.php, line 124
Class
- Excel_XML
- Generating excel documents on-the-fly from PHP5
Code
private function addRow($array) {
$cells = "";
foreach ($array as $k => $v) {
$type = 'String';
if ($this->bConvertTypes === true && is_numeric($v)) {
$type = 'Number';
}
$cells .= "<Cell><Data ss:Type=\"{$type}\">" . $v . "</Data></Cell>\n";
}
$this->lines[] = "<Row>\n" . $cells . "</Row>\n";
}