AutoHeightRow

Questions and answers on how to use XLSReadWriteII 5.
Post Reply
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

AutoHeightRow

Post by markl »

Hello!

Please, help me. How to set row height automaticaly depending on the cell content?
This code does not work on XLSReadWriteII v5.20.36 (((

Code: Select all

  
  x[0].MergeCells(0,0, 5,0);
  x[0].Cell[0,0].FontStyle := [xfsBold];
  x[0].Cell[0,0].FontSize  := 12;
  x[0].Cell[0,0].HorizAlignment := chaCenter;
  x[0].AsString[0,0] := 'very very very very very very very very very very very very very very very very long text';
  x[0].AutoHeightRow(0);
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: AutoHeightRow

Post by larsa »

Hello

This will not work for the following reasons:

1. Your text is only one line of text.
2. If you want a text to fit to the width of a column you must set: XLS[0].Cell[0,0].WrapText := True;
3. AutoRowHeight don't work with wrapped text.
Lars Arvidsson, Axolot Data
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Re: AutoHeightRow

Post by markl »

Yes, my text has only one line of text.
OK, I can set in Excel "TextWrap" and increase RowHeight manualy, but it isn't what I need! There are too many such cells in output file (((
Why AutoRowHeight doesn't work with wrapped text?
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Re: AutoHeightRow

Post by markl »

Can you answer me - why AutoRowHeight doesn't work with wrapped text?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: AutoHeightRow

Post by larsa »

Hello

It's not implemented.
Lars Arvidsson, Axolot Data
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Re: AutoHeightRow

Post by markl »

Can you implement this feature?
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: AutoHeightRow

Post by larsa »

Hello

It will probably be implemented in the next major release.
Lars Arvidsson, Axolot Data
markl
Posts: 10
Joined: Mon Jan 13, 2014 8:32 am

Re: AutoHeightRow

Post by markl »

Thank you!

Please, tell me when you plan to make next major release?
Post Reply