How to copy Google sheet data to other google sheets as Value

 How to Copy a Sheet to a Different Spreadsheet in Google Sheets✅

how to copy one google sheet data to other google sheet as value using google script 

We explain this using some steps follow this way 

copy this sheet data another sheet we want paste as value

we going copy this sheet data another sheet we want paste as value 


 

how to copy google sheet as value

go to this sheet and open app script 

then will show like this windows 

copy google sheet


and copy and paste here this below code 


function copypaste(sourcelink,sourcesheet,sourcerange,destilink,destisheet,destirange) {
  
  //Source link
  var ssraw = SpreadsheetApp.openByUrl(sourcelink);
  var sheetraw = ssraw.getSheetByName(sourcesheet);
  var range = sheetraw.getRange(sourcerange);
  var data = range.getValues();
  
  //Destination
  var ss = SpreadsheetApp.openByUrl(destilink);
  var sheet = ss.getSheetByName(destisheet);
  
  // transfer to destination range
  sheet.getRange(destirange).clearContent();
  sheet.getRange(destirange).setValues(data);
}

function run(){
  copypaste("https://docs.google.com/spreadsheets/d/1akDQoaFxziLU42iern_1lExokveIGZC50knkna9T3iA/edit#gid=1287266599","raw","A1:F600",
"https://docs.google.com/spreadsheets/d/1tpqQVFlYOf1fqbtDSyYZHh4H5PX1AOcgm_Kka5Pi5qU/edit#gid=2088523282","test","A1:F600")
}


then you can see like this 


01 this area paste your data contain excel URL 


2 is that sheet tab name 
3 is data range 
example like this 




after go second URL 



1 is which google sheet you are going copy data copy and paste  that URL to here 


like this 

1 is Google sheet URL
2 is that google sheet tab name 
3 what area you going paste 


if you want you can add many google sheet using same way 


you can apply same theory 

after complete that then select Run command and press run button then will success


google script


if not success message us we are help you

then we can set this run in schedule or specific time as loop 


go to Tigger and add Tigger 

add Tigger


you can set as run your required way 

how to run google on time





after save then it will run as loop

then your data always paste and replace 

if your aim and your task is deference then tell us we will help you 

if not clear watch our video for more clarification 


thank you 

Post a Comment

0 Comments