Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic adjustment of Cell height?
Hi,
I'm using automation to start Excel and fill some columns with data. Once of the columns has quite a bit of text in some of the cells while some only have few lines. I've set TextWrap=.t. for each Cell, but it doesn't adjust the height. Is there an excel property that I can call to do this automatcially, or some other way of working out how high each cell should be sized. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic adjustment of Cell height?
If I were doing it in excel, I'd use something like:
activesheet.rows(35).autofit (to set a specific row) or activesheet.rows.autofit (to do all of them) or activesheet.range("a1:A99").entirerow.autofit (to get a range of rows Tristan wrote: Hi, I'm using automation to start Excel and fill some columns with data. Once of the columns has quite a bit of text in some of the cells while some only have few lines. I've set TextWrap=.t. for each Cell, but it doesn't adjust the height. Is there an excel property that I can call to do this automatcially, or some other way of working out how high each cell should be sized. Thanks -- Dave Peterson |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic adjustment of Cell height?
This is my code:
SELECT QResults SCAN WITH oRange ..Columns[1].Value=QResults.wrkovertm ..Columns[2].Value=QResults.wrkdate ..Columns[3].Value=QResults.wrkbilling ..Columns[4].Value=ALLTRIM(QResults.wrkdesc) ..Columns[4].WrapText = .T. ..Columns[4].VerticalAlignment = -4160 ..Columns[4].autofit ..Columns[5].Value=QResults.staffnm Endwith * Move range down one row oRange = oRange.Offset(1,0) Endscan I added the autofit in the above code, and all it did was make each cell exactly the same size. So if there is 2 lines of text in them, the hight has been made so large that it shows about 10 more lines of extra white space underneath the text. Maybe I didn't do it right? Thanks for your help "Dave Peterson" wrote in message ... If I were doing it in excel, I'd use something like: activesheet.rows(35).autofit (to set a specific row) or activesheet.rows.autofit (to do all of them) or activesheet.range("a1:A99").entirerow.autofit (to get a range of rows Tristan wrote: Hi, I'm using automation to start Excel and fill some columns with data. Once of the columns has quite a bit of text in some of the cells while some only have few lines. I've set TextWrap=.t. for each Cell, but it doesn't adjust the height. Is there an excel property that I can call to do this automatcially, or some other way of working out how high each cell should be sized. Thanks -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row height adjustment after sort | Excel Discussion (Misc queries) | |||
Row Height Adjustment on data Imported into excel | Excel Worksheet Functions | |||
Auto Cell Height Adjustment for text entered | Excel Discussion (Misc queries) | |||
ROW HEIGHT ADJUSTMENT IN PIVOT TABLES | Excel Discussion (Misc queries) | |||
Automatic row height adjustment | Excel Discussion (Misc queries) |