Tuesday, July 30, 2013

LibreOffice writer: customize border of every second table row

Lately I wanted to achieve the following in LibreOffice writer: I had created a table and I wanted to have borders around the uneven rows whereas rows two, four should be without borders.
An example explains it quickly.

Note that there is no border between cells and that the even rows don't show borders.

Here is how to do this.

Create table

The first step of course is to create a table in writer via Insert -> Table and choosing 5 rows. Then fill in the cell contents as displayed above, the result being

Remove all borders

The next step is to clear all borders. There are two ways to do this, I'll show one.
Click any table cell and choose Table -> Table Properties.... Click on the Set No Borders icon (circled red) and OK.

This will result in this table.

Adding row borders

For this and the following steps you should enable the table toolbar via View -> Toolbars -> Table which will display a new toolbar at the bottom of your LibreOffice window.

It is easy to set the border for one row:

  • Select the row (either by marking all cells from left to right or by moving the cursor outside of the table to the left of the row until the cursor changes shape into a little arrow and clicking that arrow)
  • Click on the border icon (red circle) in the table toolbar to get a selection of border settings and set the full border (blue circle)

    which should result in this

    The cumbersome thing is: one needs to do this for each row individually, in my case rows 3 and 5.
    As one can see this is not feasible for big tables (say 20 rows or more) and there is also no easy way to change this later (if you suddenly wanted a different border setting with no borders on the left you would need to redo these steps for all rows again).
    I haven't found a nicer way to do this. Trying to mark non-consecutive rows 1, 3 and 5 did not work, in essence there doesn't seem to be a way at all in LibreOffice (or OpenOffice.org) to mark non-consecutive rows in writer (I'd be glad if someone showed me a more efficient way to set the borders).

    Anyway: with this approach I finally got my table as outlined at the beginning.

    Some more customizations: line style and colour

    Further customizations are again quite easy. First of all you always have to select the whole table (either by marking all cells or by clicking in the left cell in the first row and then shift clicking the left cell in the last row).

    Then one could set the line style by clicking the line style icon (red circle) and then choosing from the list (the blue ellipse chooses the very last entry).

    After that the table is still marked and one could continue to set the line colour by clicking the colour icon (red circle) and choosing a colour (blue circle).

    The result looks like this: a thicker border line in orange


    1. Harvard Business Review named data scientist the "sexiest job of the 21st century".This Data Science course will cover the whole data life cycle ranging from Data Acquisition and Data Storage using R-Hadoop concepts, Applying modelling through R programming using Machine learning algorithms and illustrate impeccable Data Visualization by leveraging on 'R' capabilities.With companies across industries striving to bring their research and analysis (R&A) departments up to speed, the demand for qualified data scientists is rising.

      data science training in bangalore

    2. myTectra offers Big Data and Hadoop training in Bangalore using Class Room.
      myTectra offers Live Online Big Data and Hadoop training Globally.
      Big Data and Hadoop training Unlike traditional systems, Big Data and Hadoop enables multiple types of analytic workloads to run on the same data, at the same time, at massive scale on industry-standard hardware.myTectra Big Data and Hadoop training is designed to help you become a expert Hadoop developer. myTectra offers Big Data Hadoop Training in Bangalore using Class Room. myTectra offers Live Online Big Data and Hadoop training Globally.

      hadoop training in bangalore

    3. Python has adopted as a language of choice for almost all the domain in IT including the most trending technologies such as Artificial Intelligence, Machine Learning, Data Science, Internet of Things (IoT), Cloud Computing technologies such as AWS, OpenStack, VMware, Google Cloud, etc.., Big Data Analytics, DevOps and Python is prepared language in traditional IT domain such as Web Application Development, Infrastructure Automation ,Software Testing, Mobile Testing.

      python online training

    4. Gaining Python certifications will validate your skills and advance your career.
      python certification