Skip to content

Commit

Permalink
Changed delimiter in csv export to be compatible with xlsx files
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrocha committed Oct 26, 2021
1 parent 15deb9c commit ae0312c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/AnrKbMgmtCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
type: asset.type
})
);
let csv = Papa.unparse(allAssets,{quotes: true});
let csv = Papa.unparse(allAssets,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv, 'allAssets.csv',contentT);
});
Expand Down Expand Up @@ -418,7 +418,7 @@
theme: threat.theme ? threat.theme['label' + $scope.language] : null
})
);
let csv = Papa.unparse(allThreats,{quotes: true});
let csv = Papa.unparse(allThreats,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv, 'allThreats.csv',contentT);
});
Expand Down Expand Up @@ -672,7 +672,7 @@
description: vulnerability['description' + $scope.language],
})
);
let csv = Papa.unparse(allVulnerabilities,{quotes: true});
let csv = Papa.unparse(allVulnerabilities,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv, 'allVulnerabilities.csv',contentT);
});
Expand Down Expand Up @@ -920,7 +920,7 @@
referential: measure.referential['label' + $scope.language]
})
);
let csv = Papa.unparse(allMeasures,{quotes: true});
let csv = Papa.unparse(allMeasures,{quotes: true, delimiter: ";"});
let filename = 'allControls_' + $scope.referential['label' + $scope.language] +'.csv';
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv,filename,contentT);
Expand Down Expand Up @@ -1368,7 +1368,7 @@
)
})
);
let csv = Papa.unparse(allAmvs,{quotes: true});
let csv = Papa.unparse(allAmvs,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv,'allInfoRisk.csv',contentT);
});
Expand Down Expand Up @@ -1887,7 +1887,7 @@
label: tag['label' + $scope.language],
})
);
let csv = Papa.unparse(allTags,{quotes: true});
let csv = Papa.unparse(allTags,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv,'allTags.csv',contentT);
});
Expand Down Expand Up @@ -2076,7 +2076,7 @@
)
})
);
let csv = Papa.unparse(allOpRisks,{quotes: true});
let csv = Papa.unparse(allOpRisks,{quotes: true, delimiter: ";"});
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv,'allOpRisks.csv',contentT);
});
Expand Down Expand Up @@ -2347,7 +2347,7 @@
set: recommendation.recommandationSet['label' + $scope.language]
})
);
let csv = Papa.unparse(allRecommendations,{quotes: true});
let csv = Papa.unparse(allRecommendations,{quotes: true, delimiter: ";"});
let filename = 'allRecommendations_' + $scope.recommandationSet['label' + $scope.language] + '.csv';
let contentT = 'text/csv; charset=utf-8';
DownloadService.downloadCSV(csv,filename,contentT);
Expand Down

0 comments on commit ae0312c

Please sign in to comment.