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
parent
commit
3c632d7abd
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/shared/import-export/import-export.service.ts

2
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;

Loading…
Cancel
Save