Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

ngx-papaparse

alberthaff179kMIT8.0.0TypeScript support: included

Papa Parse wrapper for Angular. Fast parser-library for CSV to JSON and vice versa, with built in support for background-workers.

csv, reader, parser, parse, parsing, delimited, text, data, auto-detect, comma, tab, pipe, file, filereader, stream, worker, workers, thread, threading, multi-threaded, angular, papa, papaparse

readme

Logo

Papa Parse wrapper for Angular

Version Travis Coveralls github License NPM downloads GitHub stars

This is a Papa Parse wrapper library for Angular.

More information in the full documentation.

Installation

You can install the library with npm.

Angular 16+

npm install ngx-papaparse@8 --save

Documentation

Older versions of Angular

For older versions of Angular, please see the docs for the correct version.

Getting started

Use the Papa Service in your project:

import { Component } from '@angular/core';
import { Papa } from 'ngx-papaparse';

@Component({
  ...
})
export class AppComponent {

    constructor(private papa: Papa) {
        const csvData = '"Hello","World!"';

        this.papa.parse(csvData,{
            complete: (result) => {
                console.log('Parsed: ', result);
            }
        });
    }
}

For a more detailed explanation of how to use this library, please refer to the full documentation.

changelog

8.0.0

  • Add support for Angular 16 (#114)

7.0.0

  • Add support for Angular 15 (#109)

6.0.2

  • Add generic type to PapaParse (#104).

6.0.1

  • Make Papaparse a dependency (#103), closes #102.

6.0.0

  • Add support for Angular 14 (#100).
  • Add typings for unparse (#58)

5.1.0

  • Add support for escapeFormulae.

5.0.0

  • Recompiled with NG9 and NG10 support.

4.0.4

  • Recompiled with NG8 support.

4.0.3

  • Fixed typing of skipEmptyLines, to allow value greedy.

4.0.2

  • Fixed ParseError not being exported, closes #47.

4.0.1

  • Fixed incorrect title in readme

4.0.0

  • Added support for new options and callbacks introduced by Papa Parse 5.
  • Removed global configuration, since it is no longer needed.
  • Papa is automatically imported in the root-module of your app.

3.0.1

  • Added support for Angular 7, closes #30.

3.0.0

  • Added support for Angular 6, closes #19.
  • Switched to Angular CLI for compilation, closes #20.
  • Added unit tests to ensure that everything works as intended, closes #21.
  • Renamed PapaParseService to Papa.
  • Renamed BAD_DELIMITERS, RECORD_SEP, UNIT_SEP and WORKERS_SUPPORTED to badDelimiters, recordSeperator, unitSeperator and workersSupported.
  • Swithced setLocalChunkSize(), setRemoteChunkSize(), setRemoteChunkSize() and badDelimiters() to setters and getters.
  • Renamed workerScriptPath to scriptPath in global config.

2.1.4

  • Added missing dependencies to package.json

2.1.3

  • Fixed incorrect instructions in README.

2.1.2

  • Fixed incorrect metadata in package.json.

2.1.1

  • Switched links to documentation to point to new website.

2.1.0

  • Switched to angular-librarian, closes #18.
  • Added a new interface for unparse, closes #17.

2.0.4

  • Fixed incorrect type on comments-parameter, closes #13.

2.0.3

  • Fixed incorrect peer dependency, closes #10.

2.0.2

  • Updated scripts for compilation, in order to publish readme on npmjs.

2.0.1

  • Fixed readme on npmjs.com

2.0.0

  • papaparse 2 only supports Angular 5. Use v1 for older versions.
  • Added official support for Angular 5, closes #7.
  • Switched to ng-packagr for compilation.
  • Fixed web-worker support, closes #6.
  • Added support for global configuration.

1.2.5

  • Fixed bug in setLocalChunkSize and setRemoteChunkSize.

1.2.4

  • Allow parsing of files through the parse-method in the PapaParseService.
  • Cleaned up dev-dependencies.

1.2.3

  • Added correct types for parameters on beforeFirstChunk and error in PapaParseConfig interface, closes #1.

1.2.2

  • Added types for all parameters in the config interface.
  • Added new interfaces for PapaParseError, PapaParseMeta, PapaParseResult and PapaParseParser.
  • Cleaned up code in PapaParseModule.
  • Minor changes in readme.

1.2.1

  • Added tags for NPM.

1.2.0

  • Optimized the compiler-configuration.

1.1.0

  • Added better comments in the PapaParseService.

1.0.0 First public release

  • Initial release of the papaparse library.