[Solved] Need to store data in google spreadsheet

mate the thing is you can’t do formatting after getting spreadsheet CSV. So i have an alternative solution for this…

Use google app script

function doGet(e){
   var action = e.parameter.action;
   var ss=SpreadsheetApp.openByUrl("Your_Spreadsheet_URL");
   var sheet = ss.getSheetByName("Sheet_Name");
  
   if(action=="GC")
      return getthe_Column(sheet);
   if(action=="GR")
      var cn = e.parameter.cn;
      return getRow_data(cn,sheet);
  
}


function getthe_Column(sheet){
   var lr = sheet.getLastRow();
   var data = "ID";
   for(var i = 2; i<=lr ; i++){
      data += ","+sheet.getRange(i, 1).getValue();
   }
   //Logger.log(data);
   return ContentService.createTextOutput(data);
}

function getRow_data(cn,sheet){
   var lc = sheet.getLastColumn();
   var data ="";
   for(var i=1; i<=lc;i++){
       if(data!=""){
          data+= ","+sheet.getRange(cn, i).getValue();
       }else{
          data = sheet.getRange(cn, i).getValue();
       }
   }
   return ContentService.createTextOutput(data);
}

Blocks Screenshot

Sample Project : Get a copy

I have also included this sample projectct just in case you won’t understand the design and blocks side. Also if you have any qury feel free to ask.