public function SpreadsheetIterator::getColumnsCount in Migrate Spreadsheet 8
Same name and namespace in other branches
- 2.0.x src/SpreadsheetIterator.php \Drupal\migrate_spreadsheet\SpreadsheetIterator::getColumnsCount()
Gets the total number of columns in the worksheet.
Return value
int The total number of columns in the worksheet.
Overrides SpreadsheetIteratorInterface::getColumnsCount
2 calls to SpreadsheetIterator::getColumnsCount()
- SpreadsheetIterator::getHeaders in src/
SpreadsheetIterator.php - Retrieves a full list of headers.
- SpreadsheetIterator::getOrigin in src/
SpreadsheetIterator.php - Retrieves the top-left origin of data area.
File
- src/
SpreadsheetIterator.php, line 291
Class
- SpreadsheetIterator
- Provides a spreadsheet iterator.
Namespace
Drupal\migrate_spreadsheetCode
public function getColumnsCount() {
if (!isset($this->cache['columns_count'])) {
$this->cache['columns_count'] = Coordinate::columnIndexFromString($this
->getWorksheet()
->getHighestDataColumn());
}
return $this->cache['columns_count'];
}