MCPcopy Create free account
hub / github.com/explorerhq/sql-explorer / csvFromTable

Function csvFromTable

explorer/src/js/table-to-csv.js:19–35  ·  view source on GitHub ↗
(className)

Source from the content-addressed store, hash-verified

17}
18
19export function csvFromTable(className) {
20
21 let csv_data = tableToCSV(className);
22
23 let CSVFile = new Blob([csv_data], { type: "text/csv" });
24
25 let temp_link = document.createElement('a');
26
27 temp_link.download = "pivot.csv";
28 temp_link.href = window.URL.createObjectURL(CSVFile);
29
30 temp_link.style.display = "none";
31 document.body.appendChild(temp_link);
32
33 temp_link.click();
34 document.body.removeChild(temp_link);
35}

Callers 1

pivotSetupFunction · 0.90

Calls 1

tableToCSVFunction · 0.85

Tested by

no test coverage detected