Импортирует диапазон ячеек из одной электронной таблицы в другую.
Пример использования
IMPORTRANGE("
https://docs.google.com/spreadsheets/d/abcd123abcd123
", "лист1!A1:C10")
IMPORTRANGE(A2,"B2")
Синтаксис
IMPORTRANGE(url_таблицы, диапазон)
-
url_таблицы
– URL таблицы, из которой импортируются данные.- Значение
url_таблицы
должно быть текстом, заключенным в кавычки, или ссылкой на ячейку, в которой содержится таблица.
- Значение
-
диапазон
– строка в формате"[название_листа!]диапазон"
(например,"Лист1!A2:B6"
или"A2:B6"
). Этот параметр указывает на диапазон, который нужно импортировать.-
Компонент
название_листа
в параметредиапазон
не является обязательным. По умолчаниюIMPORTRANGE
импортирует данные из заданного диапазона первого листа. -
Значение параметра
диапазон
должно быть текстом, заключенным в кавычки, или ссылкой на ячейку, которая содержит необходимую информацию.
-
Технические сведения и рекомендации
Если изменить исходный документ, функция IMPORTRANGE
обеспечит обновление всех открытых принимающих документов. При этом на экране появится полоса зеленого цвета. Кроме того, функция IMPORTRANGE
возвращает результаты в принимающий документ только после того, как в исходном документе будут завершены все расчеты, даже если в указанном диапазоне никаких расчетов нет.
Рекомендации
- Не используйте слишком много принимающих листов: каждый из них должен получать данные с исходного листа.
- Измените структуру и размер результата перед использованием функции
IMPORTRANGE
, особенно при импорте из часто обновляемой таблицы.- Допустим, вам необходимо посчитать сумму для 1 миллиона строк, импортированных из другой таблицы. Быстрее рассчитать сумму в исходной таблице, а затем использовать функцию
IMPORTRANGE
, чтобы импортировать результат, чем использовать функциюIMPORTRANGE
для непосредственного импорта 1 миллиона строк данных и подсчета результата в конечной таблице. Этот метод позволяет сжать и объединить данные до импорта с помощью функцииIMPORTRANGE
.
- Допустим, вам необходимо посчитать сумму для 1 миллиона строк, импортированных из другой таблицы. Быстрее рассчитать сумму в исходной таблице, а затем использовать функцию
Функция IMPORTRANGE
позволяет обновлять данные на других листах, если они привязаны к исходному. Если на листе Б содержится функция IMPORTRANGE(лист А)
, а на листе В – функция IMPORTRANGE(лист Б)
, то при внесении изменений в данные на листе А будут также обновлены листы Б и В. Любые изменения на листе А приведут к перезагрузке листов Б и В.
Рекомендации
- Ограничивайте количество последовательно связанных функцией
IMPORTRANGE
листов. - Старайтесь не применять циклы в функции
IMPORTRANGE
. Например, цикл возникнет, если вы используете функциюIMPORTRANGE
в нескольких таблицах, ссылающихся друг на друга: таблица A использует функциюIMPORTRANGE
для получения данных из таблицы Б, а таблица Б использует функциюIMPORTRANGE
для получения данных из таблицы А. Это приводит к тому, что таблицы зацикливаются, постоянно пытаются получить друг от друга данные, но никогда не выдают результат. - Изменения, внесенные на исходном листе, могут появиться на принимающем листе не сразу. Если функция
IMPORTRANGE
используется много раз в нескольких связанных документах, то от момента внесения изменений на исходном листе до появления результатов на принимающем листе может пройти немало времени.
Функция IMPORTRANGE
выполняется при первом открытии документа или если документ был открыт не более 5 минут назад. Как и в случае с цепочкой обновлений, функция IMPORTRANGE
вынуждена обращаться к каждому документу, из которого импортируются данные.
Рекомендации
- Помните, что для обновления задействованных вами документов может потребоваться некоторое время. По возможности используйте меньше цепочек в рамках функции
IMPORTRANGE
.
Разрешение и доступ
Когда таблица 1 впервые импортирует данные из таблицы 2 при выполнении функции IMPORTRANGE
, система запрашивает разрешение на доступ к информации.
При попытке импортировать данные из вашей таблицы с помощью функции IMPORTRANGE
появляется следующее сообщение:
- Подождите, пока выполняется функция
IMPORTRANGE
. - Появляется сообщение об ошибке #REF! с текстом «Необходимо связать листы.»
- Нажмите Разрешить доступ.
Если вы пытаетесь использовать функцию IMPORTRANGE
для импорта данных из таблицы, которая вам не принадлежит, то через несколько секунд появится следующее сообщение:
- В браузере введите URL исходной таблицы.
- Запросите доступ к таблице.
- Дождитесь, пока владелец таблицы разрешит вам доступ к ней.
После получения разрешения все редакторы таблицы 1 смогут использовать IMPORTRANGE
для импорта любых данных из таблицы 2. Разрешение будет действовать до тех пор, пока пользователь, давший его, не будет лишен прав доступа к таблице 2. Учтите, что предоставление доступа к принимающему листу учитывается в ограничении в 600 пользователей общего диска, которое действует для исходного листа.
Производительность
Функция IMPORTRANGE
использует внешние данные, как и функции IMPORTXML
и GOOGLEFINANCE
. Это означает, что для работы функции необходимо подключение к интернету. Google Таблицы скачивают весь нужный диапазон на компьютер и на их работе скажется низкая скорость подключения к интернету. При этом действует ограничение на объем полученных данных (10 МБ для одного запроса). Если функция IMPORTRANGE
работает медленно, попробуйте уменьшить размер диапазонов, которые следует импортировать. Вы также можете перенести сводные расчеты в исходный документ. Это позволит вам перемещать меньше данных в листы, находящиеся на компьютере, и выполнять больше расчетов удаленно.
Примечание. Вам доступны другие похожие инструменты. Apps Script может принимать данные из других документов и срабатывать при внесении изменений или по расписанию. Подключенные таблицы обновляются по расписанию и больше подходят для загрузки и импорта крупных наборов данных.
Лимиты на использование
Если функция IMPORTRANGE
использует большой объем трафика, в ячейке может появиться сообщение «Загрузка…» и подробное сообщение об ошибке с текстом «Ошибка. Загрузка данных может занять некоторое время из-за большого количества запросов. Советуем сократить число функций IMPORTHTML
, IMPORTDATA
, IMPORTFEED
и IMPORTXML
в созданных таблицах».
Ограничения касаются автора документа. Пользователю стоит учитывать количество всех функций импорта данных во всех создаваемых документах. На расходование лимита также могут повлиять изменения, которые вносят другие соавторы.
Чтобы сообщение об ошибке больше не выводилось, рекомендуем сократить число запросов на обновление данных. Например, если разрешенное значение для аргумента в функции =IMPORTDATA(аргумент)
часто обновляется, это может привести к большому числу внешних запросов, которые снижают скорость обработки данных.
Актуальность данных
Google Таблицы гарантируют пользователям быстрое обновление данных в Таблицах при разумном использовании. Функция IMPORTRANGE
автоматически проверяет наличие обновлений каждый час, пока документ открыт, даже если в формулу и таблицу не вносились изменения. Если вы удаляете, повторно добавляете или редактируете ячейки с помощью одной и той же формулы, то функция обновляется. Когда вы открываете и перезагружаете документ, функция IMPORTRANGE
не обновляется.
Пересчитываемые функции
При использовании функции IMPORTRANGE
вы можете увидеть сообщение #ERROR! с текстом «Ошибка. Функция не может ссылаться на ячейку с функцией NOW
, RAND
или RANDBETWEEN
.» Функции импорта не могут напрямую или косвенно ссылаться на пересчитываемую функцию, такую как NOW
, RAND
или RANDBETWEEN
. Этим предотвращается чрезмерное использование трафика в таблице пользователя, поскольку такие функции часто обновляются.
Примечание. Единственным исключением является пересчитываемая функция TODAY
, которая обновляется один раз в день.
Рекомендуем ознакомиться с информацией по ссылкам ниже:
- Скопируйте результаты пересчитываемых функций.
- Используйте меню Специальная вставкаТолько значения.
- Затем используйте ссылки на эти статические значения.
При этом все значения станут статическими. Например, если вы скопируете и вставите результат функции NOW
как значение, то оно больше не будет изменяться.
Если у вас остались вопросы, вы можете посетить справочный форум Редакторов Документов.
Похожие функции
IMPORTXML
: Импорт данных из источников в формате XML, HTML, CSV, TSV, а также RSS и ATOM XML..
IMPORTHTML
: Импортирует данные из таблицы или списка на веб-странице..
IMPORTFEED
: Импортирует фид RSS или Atom..
IMPORTDATA
: Импортирует данные в формате CSV (значения, разделенные запятыми) или TSV (значения, разделенные табуляцией). Для импорта необходимо указать ссылку на источник данных..
Подробнее о том, как оптимизировать ссылки на данные…
Let’s say you opened your Google spreadsheet and discovered that all your IMPORTRANGE formulas were not working. The previously imported data disappeared and refreshing won’t help get it back. Many users have already suffered from this drawback known as IMPORTRANGE Google Sheets not working. To avoid it, you’d better use an alternative solution, which turns your spreadsheet into a sort of relational database. We’ll show you how to do this a bit later. But for now, let’s troubleshoot your IMPORTRANGE formula and fix the current error.
Common IMPORTRANGE internal errors
The common Google Sheets IMPORTRANGE errors are #ERROR!
and #REF!
. You can either read how to fix them or watch the video tutorial on the IMPORTRANGE function by Railsware Product Academy or do both. It’s up to you 🙂
#1 IMPORTRANGE #ERROR! – Formula parse error IMPORTRANGE
It’s kid’s stuff! Formula parse error
means that you’ve made a mistake in the IMPORTRANGE formula syntax.
How to fix
Verify the formula syntax. Make sure also to validate the spreadsheet URL or ID, quotation marks, as well as the range string. These are the most common reasons for the formula parse error.
#2 IMPORTRANGE #REF! – Permission error or You don’t have permissions to access that sheet
This error states that “You don't have permissions to access that sheet
.” In most cases, this means that you’re trying to import a dataset from an unshared Google Sheets doc that is not stored on your Google Drive.
How to fix
Share the source spreadsheet with the owner of the target spreadsheet or make the file shareable with “Anyone with the link
.“
Streamline your data analytics & reporting with Coupler.io!
Coupler.io is an all-in-one data analytics and automation platform designed to close the gap between getting data and using its full potential. Gather, transform, understand, and act on data to make better decisions and drive your business forward!
- Save hours of your time on data analytics by integrating business applications with data warehouses, data visualization tools, or spreadsheets. Enjoy 200+ available integrations!
- Preview, transform, and filter your data before sending it to the destination. Get excited about how easy data analytics can be.
- Access data that is always up to date by enabling refreshing data on a schedule as often as every 15 minutes.
- Visualize your data by loading it to BI tools or exporting it directly to Looker Studio. Making data-driven decisions has never been easier.
- Easily track and improve your business metrics by creating live dashboards on your own or with the help of our experts.
Try Coupler.io today at no cost with a 14-day free trial (no credit card required), and join 700,000+ happy users to accelerate growth with data-driven decisions.
Start 14-day free trial
#3 IMPORTRANGE #REF! – Allow access or You need to connect these sheets
This is more of a warning than an error. When you import a range from an unshared spreadsheet stored on your Google Docs for the first time, IMPORTRANGE will require you to connect the source and the target sheets.
How to fix
Click the Allow access button to connect the sheets.
#4 IMPORTRANGE #Error! – IMPORTRANGE Result too large
You’ll see this error when you’re importing too many cells. Unfortunately, the exact amount of cells you can import with IMPORTRANGE is undisclosed. In our example, we tried to import 60 columns and 6000 rows (360,000 cells). After we decreased the data range to 4300 rows (258,000 cells), the IMPORTRANGE formula worked.
How to fix
Split the data range into two or more pieces, either vertically (by rows) or horizontally (by columns). Nest IMPORTRANGE formulas for each piece within the ARRAYFORMULA function as follows:
For horizontally split pieces (use commas between IMPORTRANGE formulas):
=ARRAYFORMULA({IMPORTRANGE("sheet-id","data-range-piece#1"),IMPORTRANGE("sheet-id","data-range-piece#2"),...})
For vertically split pieces (use semicolons between IMPORTRANGE formulas):
=ARRAYFORMULA({IMPORTRANGE("sheet-id","data-range-piece#1);"IMPORTRANGE("sheet-id","data-range-piece#2");...})
For example, here is a failed IMPORTRANGE formula:
=importrange("1bS7FGBbA7nInZJ2VBMaPxqf5B35RXpn-Z3vEcHlTwQo","Data!A:BH")
We split the range of cells "Data!A:BH"
by columns into "Data!A:AM"
and "Data!AN:BH"
and applied the following formula:
=arrayformula({importrange("1bS7FGBbA7nInZJ2VBMaPxqf5B35RXpn-Z3vEcHlTwQo", "Data!A:AM"),importrange("1bS7FGBbA7nInZJ2VBMaPxqf5B35RXpn-Z3vEcHlTwQo", "Data!AN:BH")})
#5 IMPORTRANGE #REF! cannot find range or sheet for imported range
If you see the #REF! Error with a note “Cannot find range or sheet for imported range”, it’s most likely that either the sheet name is misspelled or you entered the wrong range.
If the formula worked before and then you saw this error, then the sheet was probably renamed or deleted, or the spreadsheet was removed.
How to fix
First of all, double-check the name of the sheet (both in the IMPORTRANGE formula and your source spreadsheet) and the range you entered. In the vast majority of cases, this is the reason for this internal IMPORTRANGE error.
#6 IMPORTRANGE #REF! – Frozen formulas
This glitch is well-known among Google Sheets users. Yesterday, your IMPORTRANGE formulas worked well. Today, they return #REF!
and seem to be broken for no reason.
It happens randomly and sometimes fixes itself. For many years, Google has failed to find a stable solution to get rid of this ongoing issue with IMPORTRANGE.
How to fix
There are many approaches to fixing this issue:
- Hard refresh of the sheet and/or browser
- Re-adding the IMPORTRANGE formula to the same cell (use the Google Sheets shortcuts Ctrl+X and then Ctrl+V or clear the cell and use Ctrl+Z to restore it)
- Nest IMPORTRANGE with IFERROR
=IFERROR(IMPORTRANGE("sheet-id","range"))
The sheet will reattempt the data import again and again automatically.
- Use the
=now()
trick:- Insert a NOW formula (
=now()
) in a random cell of the source and target spreadsheets - Insert an IMPORTRANGE formula that references the NOW formula of the other spreadsheet
- Go to File => Spreadsheet settings => Calculation and select Recalculation “On change and every minute“
- Insert a NOW formula (
- Split large chunks of data into pieces using ARRAYFORMULA + IMPORTRANGE, just like with Error! Result too large.
If you know other solutions/approaches to dealing with IMPORTRANGE #REF!, please share them with us to include in the article.
If you need more information about this function, check out our IMPORTRANGE Tutorial.
How to fix all IMPORTRANGE errors at once: A peace of mind solution
The best way to solve the IMPORTRANGE Google Sheets not working issue is to avoid it. Let’s say you have 100 source sheets from which you import data to 30 sheets using IMPORTRANGE formulas. From the target sheets, you import data to another 10 sheets again with IMPORTRANGE. If all these formulas are stuck, you will face issues with troubleshooting and fixing them!
IMPORTRANGE is a function, and it takes some time to process calculations, which slows down the general performance of a spreadsheet. Instead, you can use the IMPORTRANGE alternative – Google Sheets integration. It is free of the mentioned IMPORTRANGE performance issues since no calculations are performed in the spreadsheet. It pulls the static data and saves it in your spreadsheet, just in case anything goes wrong.
Streamline your data analytics & reporting with Coupler.io!
Coupler.io is an all-in-one data analytics and automation platform designed to close the gap between getting data and using its full potential. Gather, transform, understand, and act on data to make better decisions and drive your business forward!
- Save hours of your time on data analytics by integrating business applications with data warehouses, data visualization tools, or spreadsheets. Enjoy 200+ available integrations!
- Preview, transform, and filter your data before sending it to the destination. Get excited about how easy data analytics can be.
- Access data that is always up to date by enabling refreshing data on a schedule as often as every 15 minutes.
- Visualize your data by loading it to BI tools or exporting it directly to Looker Studio. Making data-driven decisions has never been easier.
- Easily track and improve your business metrics by creating live dashboards on your own or with the help of our experts.
Try Coupler.io today at no cost with a 14-day free trial (no credit card required), and join 700,000+ happy users to accelerate growth with data-driven decisions.
Start 14-day free trial
To set up the Google Sheets integration, you need Coupler.io, a solution to import data from third-party data sources such as spreadsheets, CSV files, and numerous apps. It is available as a web app and a Google Sheets add-on. For the latter, you’ll need to install Coupler.io the add-on from the Google Workspace Marketplace.
Import data using Google Sheets integration
Sign up to Coupler.io, click Add new importer, then select Google Sheets as both source and destination apps.
Check out other available destinations, Microsoft Excel and BigQuery, as well as sources the list of which counts more than 60 and keeps growing.
Source
- Connect to your Google account and select a file on your Google Drive and a sheet to transfer source data from. You can select multiple sheets that will be merged into one master view.
Optionally, you can choose a range of data in the spreadsheet you want to export data from, i.e. A1:Z9.
Destination
- Connect to your Google account and select a file on your Google Drive and a destination sheet to transfer data to. You can select an existing sheet, or enter a name to create a new sheet.
Optionally, you can choose the import mode for your data: you can replace your previous information or append new rows under the last imported entries. Read more about optional destination setup features.
You can run the import right away if you click Save and Run. If you want to automate data import on a schedule, toggle on the Automatic data refresh and customize the schedule.
Schedule
- Select Interval (from 15 minutes to every month)
- Select Days of the week
- Select Time preferences
- Schedule Time zone
In the end, click Save & Run and welcome your data to the spreadsheet.
How frequently is IMPORTRANGE Google Sheets not working?
Although IMPORTRANGE is an awesome Google Sheets function, its reliability is arguable. Google does not publicly disclose information on the failures of individual functions. However, like any software, you can experience occasional errors when using Google Sheets. So, we can’t be sure how frequently IMPORTRANGE Google Sheets is not working.
Meanwhile, if you ask StackOverflow about any errors or failures associated with IMPORTRANGE, you’ll get many results starting from 2015. As a rule, such bugs or glitches are solved within a day or two. It’s not a long term but it’s much better not to experience this at all. This is why we recommend you consider the ETL solution by Coupler.io as an alternative to IMPORTRANGE for your project. Check it out and good luck with your data!
-
A content manager at Coupler.io whose key responsibility is to ensure that the readers love our content on the blog. With 5 years of experience as a wordsmith in SaaS, I know how to make texts resonate with readers’ queries✍🏼
Back to Blog
Focus on your business
goals while we take care of your data!
Try Coupler.io
I keep getting an error while using the IMPORTRANGE formula:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”, “Sheet1!A:B”)
I changed the name of my sheets several times to make sure everything matches but see a:
Formula parse error
and I am not sure what I am doing wrong. The original sheet has several tabs as well.
Can you see where the error is?
asked Dec 4, 2017 at 17:06
This worked for me:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”; “Sheet1!A:B”)
Maybe try it with a semicolon
Nike
1,2232 gold badges19 silver badges42 bronze badges
answered Dec 8, 2017 at 14:48
2
Add the link format
eg
=importrange("https://docs.google.com/spreadsheets/d/1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc","Sheet1!A:B")
this should fix it
answered Sep 27, 2018 at 0:16
1
One other issue that can prevent import range from working is leading or trailing space in your sheet name. Make you check the sheet tab and clean out any leading or trailing spaces or your formula won’t work.
I burned an hour reading this thread and recreating my formula over and over again before I finally found the issue.
answered Oct 28, 2020 at 13:48
You have it as Sheet1!A:B
, but you are missing the single quotes to identify the sheet name.
It should be 'Sheet1'!A:B
instead.
The full formula is below:
=importrange(“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”, “'Sheet1'!A:B”)
zx485
28.5k28 gold badges50 silver badges59 bronze badges
answered Oct 18, 2018 at 20:12
1
Make sure the sheet you’re trying to import from is saved as a google sheet. I was trying to import an .xls file into a google sheet, and it wouldn’t work. I re-saved the sheet as a google sheet and it fixed the problem immediately.
answered Feb 16, 2021 at 23:49
Problem
This formula does not work
=importrange(“1uUbz2HAzgwBwY3zMXqLJM_Z8qVQZHNP0aNHceTc”,“Sheet1!A:B”)
Reason why
You use curly double quotes “ ”
instead of straight double quotes " "
SOLUTION
Change the quotes from curly to straight
=importrange("1uUbz2HAzgwBwY3zMXqLJM_Z8qVQZHNP0aNHceTc","Sheet1!A:B")
Be careful
If you have different locale you must also change ,
to ;
answered Apr 1, 2021 at 11:26
SwenSwen
5772 silver badges10 bronze badges
Вопрос:
Я получаю сообщение об ошибке при использовании формулы IMPORTRANGE:
=importrange("1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc", "Sheet1!A:B")
Я несколько раз менял имя своих листов, чтобы убедиться, что все совпадает, но вижу:
Ошибка разбора формулы
и я не уверен, что я делаю неправильно. Оригинальный лист также имеет несколько вкладок.
Вы видите, где ошибка?
Лучший ответ:
= importrange (“1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc”; “Sheet1! A: B”)
возможно, с точкой с запятой
Ответ №1
Добавьте формат ссылки eg =importrange("https://docs.google.com/spreadsheets/d/1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc","Sheet1!A:B")
это должно исправить это
Ответ №2
Вы имеете это как Sheet1!A:B
, но вам не хватает одинарных кавычек для идентификации имени листа.
Это должно быть 'Sheet1'!A:B
Полная формула ниже:
=importrange("1uUbz2HAzgwBwY3zMXqcLJM_Z8qVQZHNP0wzRaNHceTc", "'Sheet1'!A:B")
In this tutorial, you will learn how to fix the IMPORTRANGE formula parse error in Google Sheets.
The IMPORTRANGE formula is a powerful tool that allows you to pull data from multiple sheets into a single sheet. It can be a great way to save time and simplify the process of working with multiple sheets.
However, sometimes when you try to use IMPORTRANGE you may encounter a #ERROR! message. This can be frustrating, as it can be difficult to figure out what is causing the problem.
The #ERROR! message indicates that Google Sheets is having difficulty parsing the formula due to errors in syntax.
In this guide, we will show you how to troubleshoot and fix the IMPORTRANGE formula parse error in Google Sheets.
How to Solve IMPORTRANGE Formula Parse Issue in Google Sheets
Here’s our step-by-step guide on how to solve the IMPORTRANGE formula parse issue in Google Sheets.
Step 1
One reason why the IMPORTRANGE function could return a #ERROR! is because of copy-pasting the URL directly without adding quotation marks.
Adding double quotes to the beginning and end of the URL will fix this issue.
Step 2
Another cause of the formula parse error is the addition of unnecessary characters. Removing these characters will allow Google Sheets to read the formula properly.
Step 3
You may also find unnecessary characters at the end of the formula.
In the example above, removing the three unneeded characters at the end will make the formula valid and ready to evaluate.
Summary
This guide should be everything you need to learn how to fix the IMPORTRANGE formula parse error in Google Sheets.
You may make a copy of this example spreadsheet to test it out on your own.
You might also like: