Coder Social home page Coder Social logo

hassanaftab93 / csv-white-space-remover Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

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.

License: Other

PowerShell 100.00%
powershell powershell-script utilities whitespace-interpreter

csv-white-space-remover's Introduction

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

csv-white-space-remover's People

Contributors

hassanaftab93 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.