Quantcast
Channel: PHPExcel Forum Rss Feed
Viewing all articles
Browse latest Browse all 2707

New Post: phpExcel getColumnDimension("A")->getWidth() always return -1

$
0
0
If you haven't defined a width for that column, then that's what you will get returned.... a value of -1 means "default", and the default is defined for the worksheet
$colWidth = $objectSelectedWorksheet->getDefaultColumnDimension()->getWidth();
If you've loaded this workbook from a file that contains a default value, then you can get it this way, otherwise if you get a -1 value again, then it's because your spreadsheet viewer is permitted to use whatever default it wants, and this may change from reader to reader or version to version

Viewing all articles
Browse latest Browse all 2707

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>