AI Assistant
Help Center AI Assistant is now available
Got questions about Lark? Use our AI chat to find the answers.
00:00
Click and hold to drag
Got It
Try Now
IMPORTRANGE function for Sheets

IMPORTRANGE function for Sheets

2 min read
I. Intro
The IMPORTRANGE function imports data from a specified range in a spreadsheet, allowing you to reference data across spreadsheets.
Note: You can import data from any spreadsheets for which you have copy permission. The synced data can only be viewed and not edited.
II. About the function
  • Formula: IMPORTRANGE(spreadsheet_url, range string)
  • Arguments:
  • Spreadsheet url: The spreadsheet link in which the data to be imported is located
  • Range string: The range of cells to be imported
  • Example: IMPORTRANGE("https://www.example.com/sheets/example", "'Sheet1'!A1:C3") imports data from columns A1 to C3 in Sheet1 of the specified spreadsheet. Both the link and range need to be enclosed in quotation marks.
III. Steps
Use the function
Import data
Open the spreadsheet, click the cell in which you want to add the referenced data, enter =IMPORTRANGE(, and select Select Spreadsheet.
Note: You can also directly enter the spreadsheet link and range in the formula.
250px|700px|reset
Select the spreadsheet from which you want to import, select the range from a sheet, and click Select.
250px|700px|reset
The data will then be imported into the spreadsheet in which IMPORTRANGE is used.
Note: Only the data is imported and not its format. You can change the data format to currency, date, or others as needed.
Change import settings
Click any cell that contains imported data to bring up the icon. Click the icon for the following options:
  • Access source link: Go to the source spreadsheet and edit the source data as needed.
  • Update data: Sync the latest data from the source. By default, the data is synced every 5-10 seconds.
  • Modify Data Range: Change the range in the source spreadsheet from which to import the data.
  • Break Link: Cancel the link between the current spreadsheet and source spreadsheet. The data from the source spreadsheet will no longer sync to the current spreadsheet.
250px|700px|reset
Delete the function
Select the cell with the function and press Delete.
IV. FAQs
How do I filter data referenced from the source spreadsheet?
You can filter the referenced data by using IMPORTRANGE and QUERY functions together.
Example: QUERY(IMPORTRANGE("https://www.example.com","'Sales Sheet'!A2:D6"),"where Col2='A Store'") filters and references the sales data of A Store in Sales Sheet.
  • IMPORTRANGE("https://www.example.com","'Sales Sheet'!A2:D6"): This represents the data in the A2:D6 range in Sales Sheet.
  • QUERY(IMPORTRANGE(),"where Col2='A Store'"): This represents the data in the referenced data range, where the value of the second column is A Store.
Note: The column number must be used for Col. For example, the second column must be written as Col2, and not ColB.
Why wasn't I able to reference data using the IMPORTRANGE function?
It may be due to several reasons. Check the error messages and corresponding troubleshooting using the following table. If the problem still cannot be resolved, please contact Support.
Error message
Possible cause
Solution
Unable to import data.
The data being referenced does not exist, or there is currently no permission to reference this data.
Check the source data and permissions and then re-import the data.
Circular reference detected.
The region being referenced directly or indirectly references the current region. For example: Table A cross-references a certain region of Table B, which has a formula that directly or indirectly references Table A.
Delete or modify the formula so that there is no such reference relationship between tables.
Data permissions have expired.
Your permissions for the source data table have expired, and you cannot access or reference this data.
Re-import the data after confirming that you have obtained the permission to create a copy of the source table.
Data request timed out, please try again.
The data generation time is too long.
Re-import the data.
Data retrieval failed.
An exception occurred on the server or there was a network error.
Check the network and then re-import the data.
Unable to tile display results, some cells already have content.
The cells that need to display the referenced data already contain content, and the data cannot be tiled in the worksheet.
Clear the cell content to display the data normally.
The input argument is wrong, the referenced table cannot be found, please modify or create a new formula.
The argument of the IMPORTRANGE formula is incorrect.
Correct the arguments or re-enter the formula.
The spreadsheet link does not exist or is wrong.
The first argument of the IMPORTRANGE formula (the source spreadsheet argument) is incorrect.
Check to see if the argument is entered correctly.
The referenced range or worksheet cannot be found.
The second argument of the IMPORTRANGE formula (the argument specifying the range of the source spreadsheet) is incorrect.
Check to see if the argument is entered correctly.
Internal error in formula calculation.
An error occurred internally in the formula calculation.
Re-import the data.
The number of cross-table references in the table has reached the limit (100), please delete some references and try again.
The number of cross-table formulas in the table has reached the limit of 100.
Delete some references and then re-import the data.
Iterative calculations cannot exceed 5 times.
There are more than 5 nested data references in the referenced data.
Reduce the nested references in the data.
Written by: Lark Help Center
Updated on 2024-11-25
How satisfied are you with this content?
Thank you for your feedback!
Need more help? Please contact Support.
0
rangeDom
rangeDom
rangeDom