# Class DownloadCsvService

#### Hierarchy

- DownloadCsvService

- Defined in src/download/Csv.ts:44

#####
Index

### Constructors

constructor

### Properties

encoding_
extension_
includeHeader_
quote_
separator_
subscriptions

### Methods

generateCsv
getRow_
startDownload

## Constructors

### constructor

- new DownloadCsvService(): DownloadCsvService

- #### Returns DownloadCsvService

  - Defined in src/download/Csv.ts:52

## Properties

### encoding_

encoding_: string

- Defined in src/download/Csv.ts:45

### extension_

extension_: string

- Defined in src/download/Csv.ts:46

### includeHeader_

includeHeader_: boolean

- Defined in src/download/Csv.ts:47

### quote_

quote_: string

- Defined in src/download/Csv.ts:48

### separator_

separator_: string

- Defined in src/download/Csv.ts:49

### subscriptions

subscriptions: Subscription[] = []

- Defined in src/download/Csv.ts:50

## Methods

### generateCsv

- generateCsv(data: {
  [x: string]: any;
  }[], columnDefs: GridColumnDef[]): string

- Generate a CSV.

  ### Returns

  The CSV file as string.

  #### Parameters

  - ##### data: {
    [x: string]: any;
    }[]

    Entries/objects to include in the CSV.

  - ##### columnDefs: GridColumnDef[]

    Column definitions.

  #### Returns string

  - Defined in src/download/Csv.ts:75

### getRow_

- getRow_(values: any[]): string

- ### Returns

  CSV row.

  #### Parameters

  - ##### values: any[]

    Values.

  #### Returns string

  - Defined in src/download/Csv.ts:99

### startDownload

- startDownload(data: {
  [x: string]: any;
  }[], columnDefs: GridColumnDef[], fileName: string): void

- Generate a CSV and start a download with the generated file.

  #### Parameters

  - ##### data: {
    [x: string]: any;
    }[]

    Entries/objects to include in the CSV.

  - ##### columnDefs: GridColumnDef[]

    Column definitions.

  - ##### fileName: string

    The CSV file name, without the extension.

  #### Returns void

  - Defined in src/download/Csv.ts:124

Generated using TypeDoc