# How to change default column width

In LibreOffice Calc, I can double click on the separator right of an empty column, and the column will change it's width to the default of 2.26 cm. This is annoying and unhelpful.

In almost all of my sheets I have small empty columns between several tables. So if I want to adjust it in Excel or Google Docs, I can make it so that all of the columns are 1 cm (or it's equivalent) and then mark the whole sheet and double click any column separator What I need to do in LibreOffice Calc is to go through all of the columns, one by one, and adjust them individually.

Either one of those two things will solve this problem -

1. Clicking the column separator won't do anything if the column is empty (like in excel or google doc sheets)

2. Clicking the column separator will do the exact same thing it does now, but to a default of 1 cm. instead of 2.26

Before anyone answers - yes, I did search this question in here and found no answer. And yes, I did read this - https://ask.libreoffice.org/en/questi... This answer doesn't help me, it just make the columns width be what I want when I first open a new LibreOffice Calc sheet, not when I want to adjust columns in an existing one.

All of the help that I could find until now was explorations about how to change a single column's width (which I know) and about the function of double-clicking the columns separator (which I know of and currently having an issue with)

edit retag close merge delete

Hallo

Its IMHO a common Design-Error to put empty Rows|Columns between Data belonging together.

( 2017-04-16 15:24:40 +0200 )edit

Be that as it may, most of my spreadsheets are made for personal use, and I find it more comfortable for my eyes, and easier to find what I want in a sheet. I am not going to change this design. This is not a question about what the best design is, but as to how am I going to do the design that I want, with the worst case scenario (which is things going on like they are right now) meaning that it will take me more time and effort to do what I want in comparison to other programs

( 2017-04-16 15:33:15 +0200 )edit

Sort by » oldest newest most voted

Hallo

sub small_col_width()
doc = thisComponent
sel = doc.CurrentSelection
columns = sel.Columns
columns.Width = 1000 '# units of 1/10 mm


bind it to some shortcut, or maybe to Contextmenu!
edit:
→Tools→Customize→→Contextmenus→ Menu: "Column header" … →"Add Command"…
or
→Tools→Customize→→Keyboard ….

more

Thank you for helping. Can you please explain to me what should I do with this? How do I bind it?

( 2017-04-16 16:15:15 +0200 )edit

( 2017-04-16 16:42:21 +0200 )edit

Thank you. This is still a bit complicated and difficult to understand. But let's see if I understand your solution - Is this supposed to be a command that when called, makes all chosen columns 1 cm wide? If so - That does help me, and it's better than nothing, but that's not exactly what I want, and it's still not as simple as its Excel or Google Docs counterpart. If I didn't get it right, then I am sorry, it seems that I didn't get it right.

( 2017-04-16 18:16:07 +0200 )edit