How to clone pivot table

var pivotCSV;
if (type === "csv") {
    pivotCSV = pivot;
    pivotCSV.getConfig().data.forEach(item => {
        if (item.hasOwnProperty("text") && item["text"]) {
            item["text"] = '"' + item["text"] + '"';
        }
    });
    console.log(pivotCSV);
    pivotCSV.export.csv({
        name: fileName, // pivot data will be exported to a CSV file named "pivot_data"
        //asFile: true,
        flat: true, // pivot data will be presented as a flat structure
        rowDelimiter: "\n", // the tab/newline delimiter will be used to separate rows
        columnDelimiter: "," // the semicolon delimiter will be used to separate columns
    });
}

I need to clone pivot table and add double qutoes in text column but not update in exiting pivot table.
I will not show on UI, only export I need extra double qutoes for a perticular column.

You may export your pivot to csv string instead of csv file:

let pivot_table  = pivotCSV.export.csv({
        name: fileName, // pivot data will be exported to a CSV file named "pivot_data"
        asFile: false,
        flat: true, // pivot data will be presented as a flat structure
        rowDelimiter: "\n", // the tab/newline delimiter will be used to separate rows
        columnDelimiter: "," // the semicolon delimiter will be used to separate columns
    });

and modify the result csv string (pivot_table) to your needs by yourself.

Thanks for replay.
I need CSV file with double qutoes because i have comma in column data and i can’t change the columnDelimiter with other.
So how to achive this double qutoes in CSV file in export ?

One more thing
Using this code nothing happens.
Not download anything when click on export CSV using asFile : false,
What to do next to solve my problem ?

There is no possibility to interrupt the mechanics of the export routine to modify its process.

The suggested solution was to get the csv string, not the csv file. So, you are able to modify that string by yourself and generate a needed csv file on its base manually.