OpenOffice – Remove Leading and Trailing Spaces from Cells

Our staff does a lot of data manipulation using OpenOffice Calc. We’ve always found it easier to work with data import sheets using OpenOffice over Excel, though we do like Excel for certain tasks. Here is a quick tip for removing leading spaces and trailing spaces from OpenOffice Calc worksheets.


Handling Spaces in OpenOffice

1.) Remove leading spaces from OpenOffice cells

  1. Select the cells you want to change
  2. Edit > Find & Replace
    Search for: ^s+|s+$
    Replace with: empty
    Options/Current selection only: ON
    Options/Regular expressions: ON

2.) Remove trailing spaces from OpenOffice cells

  1. Select the cells you want to change
  2. Edit > Find & Replace
    Search = spacebar*$
    Replace = nothing
    Check Regular Expressions

Related: Learn this easy trick to check for and to remove trailing commas!

How to Boost Your Website Conversions


Disclaimer: WebCitz, LLC does not warrant or make any representations concerning the accuracy, likely results, or reliability of the information found on this page or on any web sites linked to from this page. This blog article was written by David W in his or her personal capacity. The opinion(s) expressed in this article are the author's own and may not reflect the opinion(s) of WebCitz, LLC.