How to trailing spaces, leading space or both on a CSV file or any text file?
Notepad++ can easily do this task without any fuss. Can be done easily in 3 clicks, provided you have Notepad++ installed on your system.
Notepad++ can easily be downloaded just search Notepad++ on your favorite search engine.
Or try visiting this link: https://notepad-plus-plus.org/downloads/v8.6.7/
If your file that needs to be trimmed with leading or trailing spaces or both is on CSV or in a text file format, just export it or copy to Notepad++.
For the sake of clarity and for anyone of what's trailing or leading space means.
Leading spaces, are the spaces that are inserted at the front of any string.
Since spaces are typically not shown on any editor, unless some settings are set to on the editor to show the spaces.So, leading spaces may appear like its not align to the left or beginning of any editor.
While trailing spaces, appear at the end of the string.
One way to check if the string has trailing and leading spaces without any special settings, on Notepad++ just select all or prss ctrl + a together then the spaces will be higlighted and will be visible.
Please see image below, for the illustration of leading and trailing spaces.
To remove trailing and leading spaces on Notepad++, copy and paste the data to notepad++, select all or press ctrl +a.
Then click on "edit" then select "blank operations" and on the right window options select the appropriate options, for example to remove "trailing spaces" click on "Trim Trailing Space"
After clicking, highlight all data again and check whether trailing spaces are still present or was removed.
Please see image below on how to do it:
That's it hopefully it save some time to do your work.
Till next time..
Take a break, say a Prayer. It's powerful, it will calm the storms of your life.
Notepad++ can easily do this task without any fuss. Can be done easily in 3 clicks, provided you have Notepad++ installed on your system.
Notepad++ can easily be downloaded just search Notepad++ on your favorite search engine.
Or try visiting this link: https://notepad-plus-plus.org/downloads/v8.6.7/
If your file that needs to be trimmed with leading or trailing spaces or both is on CSV or in a text file format, just export it or copy to Notepad++.
For the sake of clarity and for anyone of what's trailing or leading space means.
Leading spaces, are the spaces that are inserted at the front of any string.
Since spaces are typically not shown on any editor, unless some settings are set to on the editor to show the spaces.So, leading spaces may appear like its not align to the left or beginning of any editor.
While trailing spaces, appear at the end of the string.
One way to check if the string has trailing and leading spaces without any special settings, on Notepad++ just select all or prss ctrl + a together then the spaces will be higlighted and will be visible.
Please see image below, for the illustration of leading and trailing spaces.
To remove trailing and leading spaces on Notepad++, copy and paste the data to notepad++, select all or press ctrl +a.
Then click on "edit" then select "blank operations" and on the right window options select the appropriate options, for example to remove "trailing spaces" click on "Trim Trailing Space"
After clicking, highlight all data again and check whether trailing spaces are still present or was removed.
Please see image below on how to do it:
That's it hopefully it save some time to do your work.
Till next time..
Take a break, say a Prayer. It's powerful, it will calm the storms of your life.
Comments
Post a Comment