In new Google Sheets, how can I import data from other spreadsheet?

I have the same problem with this topic How do I link a cell in Google Spreadsheets to a cell in another document? and they suggest to use IMPORTRANGE() with key inside but I didn't see any key in my sheet URL.

I have one Google survey form for gathering many data from our staff and raw data will generate to Google Sheets as report(Responses).

I need to import raw data from report(Responses) to other Google Sheets and summarize a report in it.

How can I get data from this sheet?

Answers


IMPORTRANGE() is currently not supported in the new google sheets. It will be supported in future but at the moment no one knows when exactly.

You can switch back to the old google sheets where IMPORTRANGE() is still working as usual. Or you can use a script e.g.:

function myImportRange( key , sheetrange) {
 var shra = sheetrange.split("!") ;
 if (shra.length==1) shra[1]=shra[0], shra[0]="";  

 var sheetstring = shra[0].replace( /'/g , "")
 var rangestring = shra[1] 

 var source = SpreadsheetApp.openById( key )    
 if ( sheetstring.length==0 ) sheet = source.getSheets()[0] ;
 else sheet = source.getSheetByName(sheetstring) ;

 return  sheet.getRange( rangestring ).getValues(); 
} 

You can find the original post of this script written by Ahab here: https://productforums.google.com/forum/?hl=en#!category-topic/docs/how-do-i/f_r7iVtUThM

Edit: IMPORTRANGE () is now supported.


I got it to work by using the entire URL of the source sheet:

=IMPORTRANGE("https://docs.google.com/a/myCompany.com/spreadsheets/d/1ybGlQNGhY2l5INHCz-XYhhsgRiTBBJiScKM490hQcU","'Rental Properties'!A:AX")

Note: when I first put this formula into my destination sheet, I got a REF error. If you mouse over the cell there is a pop up that says you need to "Connect" the sheets and a button that says Allow access. Click the button. A message saying Adding permissions... appears. Shortly afterward my data appeared.


Need Your Help

AS3 Blitting - Copy Pixels getting some of the source image

actionscript-3 bitmap bitmapdata

I am trying to draw something on the screen and then, copy that onto a bitmap which is on stage.

Would use of a Continuous Integration and Release Management tool be beneficial to a PHP project?

php continuous-integration qa sdlc

I've used CI within a .NET project which was pretty useful, now I'm wondering if it deploying a CI software makes sense for a PHP project. There are no "builds" within the project but running a sys...