Standardize worksheets in open office [closed]

-1

I have an open office spreadsheet file with 27 spreadsheets inside. All spreadsheets are the same, 3 columns, title, nothing more.

I need a way to format all spreadsheets one at a time. - line width - color of the headers - width of columns

Is it possible to do this in one go in excell or open office?

    
asked by anonymous 16.08.2017 / 17:20

2 answers

1

Solution found was to create a macro that standardizes the columns.

sub DailyProfit

dim largura as integer
largura = 700

rem define variables
dim document as object
dim dispatcher as object
dim rows1 as integer
dim rows2 as integer
dim rows3 as integer
dim count as integer
dim countColumn as integer

document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

oCalcDoc = ThisComponent
 oSheets = oCalcDoc.getSheets()
 count = 1
  for each RowIndex in oCalcDoc.getSheets()
    if count = 1 then
        rows1 = RowIndex.getColumns.getByIndex(0).Width
        rows2 = RowIndex.getColumns.getByIndex(1).Width
        rows3 = RowIndex.getColumns.getByIndex(2).Width
      end if

   RowIndex.getColumns.getByIndex(0).Width = rows1
    RowIndex.getColumns.getByIndex(1).Width = rows2
    RowIndex.getColumns.getByIndex(2).Width = rows3

   countColumn = 0
    for each ColumnIndex in RowIndex.getRows
        countColumn = countColumn + 1
        ColumnIndex.height = largura
        if countColumn >= 100 then
            exit for
        end if
    next

   count = count + 1
  next RowIndex

end sub
    
17.08.2017 / 13:46
0

I understood that you have a file with 27 sheets (tabs), if yes, just select all the tabs and make the change in the first visible, the others took the formatting applied. To separate them, just click on any tab without being the first one.

Follow this procedure: If the tabs are all in sequence > Click on the 1st tab, press Shift + last desired tab. // If the tabs are not in sequence > Click on the 1st tab, press Ctrl + the desired tabs. Then do the desired formatting on the active tab (anything you do will be replicated to all selected ones), at the end click on any other tab to separate them. (Performed in Win7 + LibO 5.3.5.2)

    
18.08.2017 / 00:42