Standardize spreadsheets in open office

Asked

Viewed 82 times

-2

I have an open office spreadsheet file with 27 spreadsheets inside. All sheets are equal, 3 columns, title, nothing else.

I need a way to format all worksheets at once. - line width - header color - width of columns

It is possible to do this at once in Excell or open office?

  • 1

    Tried with macro? if they are equal the process of one is the same for the rest. That way I believe the question is on topic since it has something programming.

  • @rray think that openoffice does not accept macro.

  • @Articuno has yes, some things not compatible with MS office also depends on the OO version or if it is libreoffice, broffice etc.

  • I asked here because I thought there would be some macro that could be done, so I asked in the programming topics.

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

0

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

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

  • Ola @Virgilio Novic, I didn’t understand your comment, explain.... This answers the question yes, for Libreoffice.

  • 2

    I tried it in libreoffice and it did not do, the only way it solved was the macro.

  • I edited the answer, follow the procedures....

Browser other questions tagged

You are not signed in. Login or sign up in order to post.