Ask Your Question
0

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

asked 2020-05-24 11:50:01 +0100

nic gravatar image

updated 2020-08-09 11:53:37 +0100

Alex Kemp gravatar image

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.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
1

answered 2020-05-24 13:05:29 +0100

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

Columns_report

edit flag offensive delete link more
0

answered 2020-05-24 14:01:30 +0100

LeroyG gravatar image

updated 2020-10-11 23:02:13 +0100

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.

edit flag offensive delete link more

Comments

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 gravatar imagenic ( 2020-05-25 22:41:20 +0100 )edit

nic,

I do not see decimals.

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

LeroyG gravatar imageLeroyG ( 2020-05-25 22:58:34 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2020-05-24 11:50:01 +0100

Seen: 203 times

Last updated: Oct 11 '20