Skip to content

Latest commit

 

History

History
62 lines (43 loc) · 1.95 KB

README.md

File metadata and controls

62 lines (43 loc) · 1.95 KB

CSV File White Space Remover

How to remove whitespace from CSV file?

Before we explain that, why do we want to do that? Sometimes Excel or Notepad will not recognize whitespaces when you try to remove extra spaces in an entire column of data, or a dataset.

So this script file in the code will help remove those white spaces, it converts them to "?" characters, which can then be manually removed.

  • Clone Repo
  • Rename your CSV File into "file.csv"
  • Run Script
  • Open the new CSV File generated by the script
  • CTRL+H to open Find and Replace Window
  • Replace all "?" with "".

Remove leading and trailing spaces from CSV file with PowerShell to get the PowerShell script to work.

Run Locally

  • Rename your CSV file to "file.csv"

  • Clone the project

  git clone https://github.com/hassanaftab93/CSV-White-Space-Remover
  • Go to the project directory Manually or Run the Command
  cd c:/path/to/script
  • Execute the Command
  ./WhiteSpaceRemover.ps1
  • Or you can right click on the File and select Run with Powershell

  • If the Powershell returns an error about Execution Policy not allowing Windows to execute Powershell Scripts then do the following:

    • Start Powershell in Admin Mode
    • Run this command:
  Set-ExecutionPolicy RemoteSigned

Releases

Contributing

Contributions are always welcome!

Authors

🔗 Links

portfolio linkedin