Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Column count based on the title #9

Open
gen2tech opened this issue May 30, 2018 · 2 comments
Open

Getting Column count based on the title #9

gen2tech opened this issue May 30, 2018 · 2 comments

Comments

@gen2tech
Copy link

Hello there, thanks for the great library, I was looking at the code, I can't find the function to get the column count probably based on the titles (The first row) like:

public function getColCount(){
$rowColSpan = $this->_cSheet->sheetData->row[0]['spans'];
$col = explode(":",$rowColSpan)[1];
return (int)$col;
}
Note: It was just a suggestion, but I really hope you look into it,

Thanks

@Peyotito
Copy link

Peyotito commented Dec 1, 2020

MAybe this helps:

/**
* This method returns number of cols in active sheet.
*
* @return int - col number of the last col.
*
* @category Sheet manipulations
*/
public function getColCount(){
return count($this->_cSheet->cols->col);
}

@Peyotito
Copy link

See Issue #22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants