in reply to Problem seeing multiline text in Excel cells

May be this: You cannot use the AutoFit feature for rows or columns that contain merged cells in Excel

  • Comment on Re: Problem seeing multiline text in Excel cells

Replies are listed 'Best First'.
Re^2: Problem seeing multiline text in Excel cells
by merrymonk (Hermit) on Jan 24, 2010 at 14:49 UTC
    Thanks, it could well be but I do not think that is what it says 'on the tin (for WrapText).
    I added the following line and I can see all the text.
    $sheet -> Range("B2:J2") -> {RowHeight} = 60;
    However, the text is positioned at the bottom of the cell. So far my searches to find how to set the alignment
    so that it is at the top of the cell have failed. Can anyone help?
    Also is there any means of setting the height so that this is the correct value for the entered text so that there are no blank lines?
      Using the reccomended method of recording a VBA macro, I found that the following two lines
      put the text to the top and left of the cell.
      $sheet -> Range("B2:J2") -> {HorizontalAlignment} = xlHAlignLeft; $sheet -> Range("B2:J2") -> {VerticalAlignment} = xlTop
      It still would be good to know how to make the height of the row to fit exaclty the height of however many lines of text there are.