height


PHPExcel setRowHeigt -1


I use phpoffice/phpexcel and I have problem with autofit row height.
I've found I should use:
$height = -1;
$sheet->getStyle("B$rowNum")->getAlignment()->setWrapText(true);
$sheet->getRowDimension($rowNum)->setRowHeight($height);
It doens't work for me. But if I set $height = 40; it works correctly.
I've found in PHPExcel_Worksheet_RowDimension class method setRowHeight:
class PHPExcel_Worksheet_RowDimension
{
[...]
private $_rowHeight = -1;
[...]
public function setRowHeight($pValue = -1) {
$this->_rowHeight = $pValue;
return $this;
}
[...]
}
So - actually -1 is default value for row height and defaultly row height isn't fitted.
Can anyone help me?
-1 is the default height: but there isn't an autosize for row height in there is for column widths. It's not a function that MS Excel provides, so it isn't done in PHPExcel either. You can only set a row height to a specific dimension, or tell it to apply the default.

Related Links

Susy gallery breaks height for display table and table-cell
Flex Slider full height and width without stretching
mPDF set Height for SetHTMLHeader
How to Set Height of PdfPTable in iTextSharp
Margin not showing with 100% width & height
KO Grid Scrollbars not visible & Display issues
Increase scrollview's element height on clicking it
Using soft keyboard on libgdx for iOS and Android (hides textview)
Fine-uploader - Scaling picture by height
Zurb foundation framework - 100% height grid
Dynamically expanding CollectionView : Height of the CollectionView itself (not the items) changing when adding new items
IE 11 bug, div with height > 1,533,917px display negative computed height and doesnt render
iText setMinimumHeight on splitted cell
Apply Document Height to a div using Jquery
jQuery UI Dialog - Height always incorrect on first show, and vertical centering incorrect when page is scrolled
XSL-FO: Set fixed block height

Categories

HOME
sql-server
crystal-reports
crate
websphere
jsviews
paramiko
google-contacts
vs-team-services
actionscript
checksum
xtext
filter
dataframe
schemacrawler
google-spreadsheet-api
google-plus
height
ssr
uiview
sign
pdo
spring-cloud-config
aspell
factor-analysis
ada
ng-show
mousewheel
jive
distance
jni
sql-update
rails-activerecord
google-ima
countif
remove-method
pdfsharp
dss
cgal
ggmap
winscp
ivy
protobuf-net
skygear
pyscripter
canvasjs
getline
large-data
google-guava-cache
redhat-datavirt
issue-tracking
axis-labels
fltk
active-model-serializers
delphi-10.1-berlin
linq-to-entities
intellij-idea-2016
fastq
chrome-remote-desktop
mcrypt
pspice
atlassian-crowd
cron-task
django-filer
multiple-file-upload
selecteditem
gradle-release-plugin
jenkins-scriptler
affix
app.xaml
response-headers
on-duplicate-key
ibmsbt
csplit
code-testing
korma
chrome-for-android
confusion-matrix
dllexport
lame
iconv
shortcuts
cgpath
lync-server-2010
android-4.0
sequelpro
usn
symfony-2.0
deploying
plone-funnelweb
shim
applicationcontext
makefile-project
hinstance
selectmanycheckbox
surf
chdatastructures
front-controller
iphone-sdk-3.2
mvvm-foundation
standardized

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App