[Solved] Auto fit column or row to contents

Discuss the spreadsheet application
Post Reply
RichardSc47
Posts: 22
Joined: Sun Nov 16, 2014 6:36 pm

[Solved] Auto fit column or row to contents

Post by RichardSc47 »

Hi everyone,

does openoffice calc have an 'Auto fit column width' option anywhere.
I can't find it.

Thanks for help
from
Richard
Last edited by RoryOF on Thu Feb 19, 2015 4:40 pm, edited 2 times in total.
Reason: Added green tick. [RoryOF, Moderator]
Open Office 3.4.1
Vista and Windows7
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Auto fit column or row to contents

Post by Villeroy »

It does even have help files. While working with Calc hit F1 and type "width" or "height" into the keyword index (second tab).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
RichardSc47
Posts: 22
Joined: Sun Nov 16, 2014 6:36 pm

Re: Auto fit column or row to contents

Post by RichardSc47 »

Thanks,
I found you can do it by double clicking when on column or row edge (when the left/right arrows and thick line pop up).
Selecting multiple columns or rows adjusts them all at once.
Open Office 3.4.1
Vista and Windows7
User avatar
MTP
Volunteer
Posts: 1620
Joined: Mon Sep 10, 2012 7:31 pm
Location: Midwest USA

Re: Auto fit column or row to contents[solved]

Post by MTP »

You can also do it by right-clicking in the gray row number or column letter area and choosing "Optimal Row Height" or "Optimal Column Width" menu option.
OpenOffice 4.1.1 on Windows 10, HSQLDB 1.8 split database
RichardSc47
Posts: 22
Joined: Sun Nov 16, 2014 6:36 pm

Re: [Solved] Auto fit column or row to contents

Post by RichardSc47 »

Thanks
Open Office 3.4.1
Vista and Windows7
opoppal
Posts: 2
Joined: Fri Dec 11, 2015 2:55 pm

Re: [Solved] Auto fit column or row to contents

Post by opoppal »

Trying in OpenOffice Spreadsheet to autofit column width or row height to content (which is a cinch in MS Excel or on iWork Numbers) I can't find a way that works. "Optimal Row Height/Column Width" allows me to put in measurements and so eventually arrive by trial and error what works, but that's not the same as "autofit" in one click. I'd be grateful for advice. Or should I just forget about trying and accept that this option doesn't exist in OpenOffice?
OpenOffice 4.1.2 on Yosemite 10.10.5
RichardSc47
Posts: 22
Joined: Sun Nov 16, 2014 6:36 pm

Re: [Solved] Auto fit column or row to contents

Post by RichardSc47 »

Just hover on the column or row dividers, click when the cursor changes to a thick vertical line with left and right arrows and it will auto your row or column.
Open Office 3.4.1
Vista and Windows7
opoppal
Posts: 2
Joined: Fri Dec 11, 2015 2:55 pm

Re: [Solved] Auto fit column or row to contents

Post by opoppal »

Thanks, RichardSC47. I've tried hovering on the divider, and nothing happened. Hovering on the divider in the blue frame did produce a cross with arrows at the end of one of one of its two lines, and that allowed me to widen the column. But there was nothing auto about it. Perhaps the problem is that your experience is with OpenOffice on a PC, and mine is on a Mac.
OpenOffice 4.1.2 on Yosemite 10.10.5
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [Solved] Auto fit column or row to contents

Post by RoryOF »

I found (Xubuntu 15.10) it needs a double click.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
RusselB
Moderator
Posts: 6646
Joined: Fri Jan 03, 2014 7:31 am
Location: Sarnia, ON

Re: [Solved] Auto fit column or row to contents

Post by RusselB »

In Windows, up to and including Windows 7, possibly after, if you right click on the column letter or row number, then select Optimal Column Width (or Optimal Row Height as appropriate), the number that can be altered is the excess width/height that you wish to incorporate. Leave the check box checked, or if unchecked, check it.
OpenOffice 4.1.7, LibreOffice 7.0.1.2 on Windows 7 Pro, Ultimate & Windows 10 Home (2004)
If you believe your problem has been resolved, please go to your first post in this topic, click the Edit button and add [Solved] to the beginning of the Subject line.
RickVR
Posts: 1
Joined: Thu Dec 28, 2017 3:37 am

Re: [Solved] Auto fit column or row to contents

Post by RickVR »

If you have the "Wrap text automatically" option enabled then the "Optimal Column Width" function will do very weird stuff like shrink the column to the length of the longest single word in the column or worse if you also have the "Hyphenation active" option set as well.

Format -> Cells -> Alignment Tab -> Wrap text automatically
OR
Ctrl+1 -> Alignment Tab -> Wrap text automatically

If you uncheck the "Wrap text automatically" option then you will get results closer to what Excel and others do.
OpenOffice 4.1.4
Windows 10
travis_mcgee
Posts: 1
Joined: Fri Oct 12, 2018 9:29 pm

Re: [Solved] Auto fit column or row to contents

Post by travis_mcgee »

Autofitting columns ...

Yes. It's been driving me insane too.

Part of the problem some people are having could be that they are not demerging their file cells. (You have to eliminate any hidden columns. Demerge and merge are the same thing for OO, so just go to Format and select Merge. Then eliminate the blank columns.)

There really should be a way to just select all and have everything autofit as with Excel (I know, I know, I'm committing heresy ...)
Gammerz
Posts: 2
Joined: Mon Nov 29, 2021 12:58 pm

Re: [Solved] Auto fit column or row to contents

Post by Gammerz »

  • Select all rows and and columns by pressing ctrl+a or clicking the top left empty column/row name. All the cells will be selected and turn blue.
  • Double click on any column divider between the column names.
LibreOffice 7.1.7.2 on Windows 10
Post Reply