Browse Source
Merge pull request #12633 from ChantsovaEkaterina/bug/csv-export-string-with-semicolon
Fixed CSV export for strings containing semicolon
pull/12666/head
Andrew Shvayka
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
1 additions and
1 deletions
-
ui-ngx/src/app/shared/import-export/import-export.service.ts
|
|
|
@ -812,7 +812,7 @@ export class ImportExportService { |
|
|
|
private processCSVCell(cellData: any): any { |
|
|
|
if (isString(cellData)) { |
|
|
|
let result = cellData.replace(/"/g, '""'); |
|
|
|
if (result.search(/([",\n])/g) >= 0) { |
|
|
|
if (result.search(/([",;\n])/g) >= 0) { |
|
|
|
result = `"${result}"`; |
|
|
|
} |
|
|
|
return result; |
|
|
|
|