Skip to content

Tool to correct malformed line breaks in CSV files (e.g. columns separated into multiple lines) and remove empty lines, ensuring a valid file ready for processing.

flaviosp15/csv-line-fixer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

CSV Line Fixer

A Node.js application to fix and format CSV files with common issues like unclosed quotes, broken lines, and inconsistent formatting.

πŸš€ Quick Start

Prerequisites

  • Node.js 16 or higher
  • Git (for cloning the repository)

Installation

Clone from Repository

# Clone the repository
git clone https://github.com/flaviosp15/csv-line-fixer.git
cd csv-line-fixer

πŸ“‹ How to Use

  1. Start the application:
node app.js
  1. Enter the CSV file path when prompted:
Enter the path of your input file: /path/to/your/file.csv
  1. Let it process - The app will:
  • βœ… Validate your file path and extension
  • βœ… Create a fixed version with FIXED- prefix
  • βœ… Show processing time and completion status

✨ Features

  • Removes blank lines and empty value rows
  • Fixes unclosed quotes across multiple lines
  • Normalizes spaces and quote formatting
  • Handles large files efficiently with stream processing
  • Validates input with clear error messages

πŸ“ Output

Creates a new file in the same directory with FIXED- prefix:

  • Input: my-file.csv
  • Output: FIXED-my-file.csv

πŸ›  File Validation

The app checks for:

  • βœ… CSV file extension (.csv or .CSV)
  • βœ… File existence and read permissions
  • βœ… Valid file (not a directory)

πŸ’‘ Examples

Windows:

Enter the path of your input file: C:\Users\name\data\file.csv

Mac/Linux:

Enter the path of your input file: ./data/file.csv

⚑ Performance

  • Processes files line by line using streams
  • Low memory usage even for large files
  • Displays processing time upon completion

❓ Need Help?

Common issues:

  • Ensure file has .csv extension
  • Check file exists at the specified path
  • Verify read permissions for the file

About

Tool to correct malformed line breaks in CSV files (e.g. columns separated into multiple lines) and remove empty lines, ensuring a valid file ready for processing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published