I want to change my column sizes, how do I get a report of their current settings?

I want to change my column sizes, how do I get a single report of their current settings?
The ‘Format > Columns > Width’ option is very cumbersome for multiple columns.

Hello @nic

I am not aware of native Calc functionality to get column widths in a single report. Perhaps you could use a macro to iterate over desired columns to get the information needed. Just to get an idea, macro below returns some info about selected columns:

Sub ColumnsReport
oSelectedColumns = ThisComponent.getCurrentController.getSelection.Columns
sReport = ""
For i=0 to oSelectedColumns.Count-1
	sCName = oSelectedColumns.ElementNames(i)
	iCWidth = oSelectedColumns.GetByIndex(i).Width
	bCVisible = oSelectedColumns.GetByIndex(i).IsVisible
	sReport = sReport & "Column name: " & sCName & "; width: " & iCWidth/100 & "mm; visible: " & bCVisible & "." & CHR$(10)
Next i
msgbox sReport, 0, "Columns report"
End Sub

nic,

Not a metric answer, but with =CELL(“WIDTH”;A1) you obtain “the number of zeros (0) that fit into the column [1 in the example, by “A1”] in the default text and the default size”.

Source: LibreOffice 6.4 Help.

EDIT: The result became fixed until you press Ctrl+Shift+F9 (the same that choosing menu Data - Calculate - Recalculate Hard).

Now a metric answer: When you click between two column headers a tooltip pops up with the width.

image description

Tested with LibreOffice 6.3.6.2 (x86); OS: Windows 6.1.


Check the mark (Correct answer mark) to the left of the answer that solves your question.

Thanks! As it happens this approximation will do nicely for my purposes. However (though I suspect not) is it possible to amplify the formula to get it to report a number of decimal places for more exactitude?

nic,

I do not see decimals.

Moreover: the result became fixed until you edit (F2 - Space - Backspace - Enter) or retype the formula.