Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In a Google Doc spreadsheet I would like to have each row the same height no matter how much text is in each cell.

I have tried "resize row" but no matter how many pixels I put in, the row expands downward to the height of the highest cell with full expanded text.

How can I force the row to stay a certain height and insert scrollbars for all text that is longer than that height?

alt text

Here's a video explaining what I mean:


share|improve this question
I can't find a way to do it. I'd be interested in seeing a solution to this as well. – Al E. Sep 22 '10 at 12:55
There may be a way to show a limited amount of content and then expand it or open in a box onclick using a custom script. How tied are you to the particular interface scetched in your image? – Dan Roberts Oct 1 '10 at 1:19
The solution I need to to be able to paste "endless text/images" into the little cells so that I can zoom in and look at all that text if I want but can at any time, back up and get an overview of all my notes and code. Right now, I cannot get this overview since the long texts and code inserts expand everything so far down the page. – Edward Tanguay Oct 7 '10 at 7:21
I've just joined, so my lack of rep points means I'm not allowed to upvote user554370's solution to this, namely to add the large bit of text as a comment instead. I'm not sure if it would have solved the OP's question or not, but it certainly helped me out, so thank you. – user66994 Apr 25 '14 at 10:56
Took the liberty to upvote !! – Jacob Jan Tuinstra Apr 25 '14 at 12:05

16 Answers 16

There is no solution for this one. This is just how HTML works. They are using Table for the cells and by default it's not adding scroll bars if the text doesn't fit. Maybe they will change it in the future, but I don't think that this is in their priority list. And it looks like you can merge cells only horizontally, just in case you wanted to merge vertically to make it look nicer.

share|improve this answer
I wonder why they didn't implement overflow:scroll on cells to allow for this. – Al E. Oct 6 '10 at 21:39
Incorrect @Lipis. It's not a limitation of HTML. A simple <div style="overflow:hidden; height: 20px;">Stuff in here</div> would do the trick. – Levitikon Jun 9 '12 at 17:26
@Levitikon but can you imagine how ugly would that be with so many scrollbars? and if you don't have scrollbars you wouldn't see the whole text.. and you had to guess that there is something more there to see it after you click on it or something.. I don't think that that is a good solution.. – Lipis Jun 9 '12 at 19:41
@Lipis: So you have cell { overflow:hidden } cell:hover { overflow:scroll } and then you only see the scrollbar of the cell you've hovering over. – RickMeasham May 22 '14 at 6:35
Now it's possible to merge cells vertically. – Rubén May 5 '15 at 23:12

Fourth option from the right (Menu bar - once you're in the spreadsheet with the results, etc.). There is an option "WRAP TEXT", select the rows you want and click it.

This sorted it out for me. Once wrap text was on and all rows went to a single line height, I could then also select all rows and resize them all when resizing one, just like in Excel.

** The 'Wrap Text' isn't in any of the dropdown menus, it is a button on the ribbon underneath (same section as horizontal and vertical align).

share|improve this answer
This was the answer for me, thanks! – Znarkus Mar 22 '13 at 9:32
This answer is just much more useful than the accepted one! – freitass Mar 29 '14 at 19:03
@freitass: For the OP, this isn't 'more useful'. He has code in his cell which has many linebreaks. Turning off the wrapping wont fix his (or my) issue as you just end up with the cell being as long as the number of newlines in your content. It would work for paragraph text though. But that isn't the OP's problem. – RickMeasham May 22 '14 at 6:33
Although this answer could be helpful, it doesn't address the OP's problem. – Rubén May 5 '15 at 23:10

I've found that it works to add an additional row under the row you're working on, and then merge the two rows together.

Now, if you paste long text in any of the fields in the "double" row, it will only show you a few lines, keeping your sheet clean and manageable. The text in any field expands for you to read if you double-click on that field.

An example of a spreadsheet excerpt demonstrating the described behavior

Downsides appear when trying to rearrange or sort rows, for instance, since rows work "by two" with this solution, but maybe that's not a big problem.

share|improve this answer

When cells contain linebreak characters, the 'Overflow', 'Wrap', and 'Clip' formatting options do not have the desired effect of limiting the height of the row.

To work around this, one can create an adjacent column that uses a formula to strip out the linebreak characters, then hide the original column. This approach preserves the ability to properly filter and sort the data.

One such formula is: =arrayformula( iferror( SUBSTITUTE(A:A,char(10), " " ) )). Paste it into row 1 of an adjacent column, replacing A:A with the label of the source column.

Hide the original column, then apply [overflow|wrap|clip] formatting to the newly created column.

Showing the undesirable tall row

Showing a conveniently sized row, and the formula that enables it

share|improve this answer

There is no actual way, wrapping will effect cell width not it's height. Whenever it bothers me I add the text as a comment block. Simply right click on a relevant cell and select "comment" off the context menu; delete the auto generated text and paste yours. This way you'll be able to maintain a fixed row height for all your rows.

share|improve this answer

The new Google Sheets allow to merge cells vertically. Doing this, makes that the row height is keeped; when the cell is in edit mode, the vertical scrollbar is displayed.


share|improve this answer

If they're not offering the feature your only option may be to create a Greasemonkey script, assuming you want it that bad.

share|improve this answer

I agree, that so far this is impossible but have you tried using different hex characters like NBSP for your text? This would make things ugly and lose your formatting I noticed without carriage returns the length of the entry has no bearing on the height.

Edit: You should also submit your (very well presented idea) here

share|improve this answer

Simple. Select all cells in the spreadsheet, then unselect the WRAP TEXT button. See button highlighted in the below screenshot. Every row and column will revert back to identical sizes.

enter image description here

share|improve this answer
This only works if the text is wrapped. If the text has carriage returns or new lines (as does the text posted in the question) that button doesn't do anything. – zeh Feb 6 '14 at 20:48
this helped me for a similar issue where the heights of rows would not work properly. also note that the icon is slightly different in the newest google docs (released late 2014). – meklarian Apr 14 '15 at 22:16

Firstly, remove all the filters from your sheet if you have any. Then, just add this script in your script editor and run.

function myFunction() {
   var ss = SpreadsheetApp.getActiveSpreadsheet();
   var sheet = ss.getActiveSheet();
   var maxRows = sheet.getMaxRows(); 
   for (var i=2; i<=maxRows;)
     range = 'A'+ i.toString() + ':Z' + (i+1).toString();
     //sheet.setRowHeight(i+1, 1);
     i += 2;

Note: if you want to resize your rows too then uncomment the second last line.

share|improve this answer

I am able to achieve this in two ways:

  • Turn off word-wrap on every cell in the row (as everyone has already mentioned)
  • Replace all line breaks inside the text with 1000 spaces (The 1000 spaces will appear as a line break)
  • Replace all tabs inside the text with 4 spaces (The 4 spaces will appear as a tab)

I have written a script to be run from Tools->Script Editor:

function myFunction() {

  var r=SpreadsheetApp.getActiveSheet().getDataRange();
  var rws=r.getNumRows();
  var cls=r.getNumColumns();
  var i,j,a,find,repl;
  repl="                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                ";
  for (i=1;i<=rws;i++) {
    for (j=1;j<=cls;j++) {
      a=r.getCell(i, j).getValue();
      if (r.getCell(i,j).getFormula()) {continue;}
      try {
        r.getCell(i, j).setValue(a);
      catch (err) {continue;}

This is what is looks like collapsed: enter image description here

This is what it looks like when cell is double clicked and expanded with vertical scroll bar: enter image description here

share|improve this answer

It has to do with the fact that you're copying and pasting from somewhere else. If you're pasting, copy the material to Notepad first and get rid of any unwanted spaces. Then paste into Google Spreadsheet. Then the wrap will work correctly.

share|improve this answer

Wrap text worked for me. Here is why: After unwrapping the particular row, I noticed that there was a column for which someone had reduced the width drastically. Not even one character would fit properly in that column (but there were couple of lines of text in that column) and that had caused the row to grow in height tremendously. Since the column was so small, none of the text was visible and even after resizing, the row height did not change. Once unwrapped, all it needed was to change the column width and wrap the row again.

share|improve this answer

How about using notes?

I had newline characters in my text that I wanted to show somehow in a single row, too - what I ended up doing was adding the long text into a note. These can be many lines and show when you float - which is about the functionality I was looking for. The only remaining problem really is that the note box is very narrow!

Here's what it looks like now when floating on the cell:

Data with newlines in notes (Google Sheets)

(I realise this doesn't quite fix the OP's problem as stated, but there's no way to achieve what they ask for, currently in Google Sheets.)

share|improve this answer

Fourth option from the right (Menu bar - once you're in the spreadsheet with the results, etc.). There is an option "WRAP TEXT", select the rows you want and click it.

share|improve this answer
How does this answer the question? – Vidar S. Ramdal Nov 6 '12 at 14:32

Try this link below


This should help you resize the columns and rows.

share|improve this answer
Always include important content of link in your answer. – serenesat Jul 23 '15 at 10:45
While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Jacob Jan Tuinstra Jul 23 '15 at 18:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.