I want to change the csv delimiter from the default comma to a pipe. There does not seem to be an option on the Export dropdown. Is there any way to do this?
I want to change the csv delimiter from the default comma to a pipe.
No, currently this is not supported and there is no direct way to do it. But you can use other tools to the do same, such as Azure Logic Apps with below design
:
replace(body('Create_CSV_table'),',','|')
Output:
The above data can be sent in file in mail or to blob in blob storage from there you can download it.
Alternatively you can use JS like below:
Inline script:
var rithinput =workflowContext.actions.Compose.outputs;
const rithdelimiter = '|';
const rith_head = Object.keys(rithinput[0]);
let Filecontent = rith_head.join(rithdelimiter) + '\n';
rithinput.forEach(obj => {
const row = rith_head.map(header => {
let value = obj[header];
if (typeof value === 'string' && value.includes(rithdelimiter)) {
value = `"${value}"`;
}
return value;
});
Filecontent += row.join(rithdelimiter) + '\n';
});
return Filecontent;
Output:
The above data can be sent in file in mail or to blob in blob storage from there you can download it. You can also use azure functions, powershell other than logic apps.