Upload a csv file to retool storage without header

  • Goal: I am trying to create a csv file of the selected rows and trying to upload the file to retool storage and storing that file id in the retool database ->

  • Steps: i am able to select the selected rows but not able to upload to retool storag -->

  • Details:
    function selectRowCreateCsvAndUpload(){
    const selectedRow = table1.selectedRows

    const csvData = Papa.unparse(selectedRow);
    console.log(csvData)
    const result = utils.exportData(csvData,'selected_row_data.csv', 'csv');
    console.log(result);
    return 'CSV file with selected row data has been uploaded to Retool storage.';
    }

return selectRowCreateCsvAndUpload();

-->

1 Like

Hey @naveen-jain-ibc! Not sure what issues you are hitting, but I was able to do this with the following setup.

JS Query:

Retool Storage Upload:

Retool Storage File:

1 Like