The imported data is not always up to date with the source pages when I load the spreadsheet. When this happens, F5 refresh does not help. Nor does Ctl-F5. Apparently there is some kind of caching going on.

I'm thinking that they may be limiting the URL fetches when I try to refresh too often - like when I'm actively modifying my spreadsheet.

In that thread, a poster suggests appending a random querystring to the URL you wish to scrape from -

I used a simple workaround of appending a parameter which updates every minute.

Function call is: =ImportHtml("http://www.fifa.com/worldcup/standings/index.html?"&H81;"table";4)

Formula in H81 is: =Minute(Now())

This does the trick for me.

• Really good one :) – Lipis Sep 17 '10 at 7:56
• Interesting they say hourly. I seem to get instantaneous data with every page load. That is until it balks. Perhaps the 1 hour delay kicks in. But what is the rhyme or reason to the lock-down. I'll try your hack when that happens. Thanks. – Chris Noe Sep 17 '10 at 10:48
• At this time, the proposed formula returns "Error: This function is not allowed to reference a cell with NOW(), RAND(), or RANDBETWEEN()" – Rubén Sep 3 '16 at 14:25

You are right, the import functions updates their result at certain intervals.

Explanation

From Change a spreadsheet's locale, time zone, recalculation, and language, a help article from the official documentation,

Note: External data functions recalculate at the following intervals:

• ImportRange: 30 minutes
• ImportHtml, ImportFeed, ImportData, ImportXml: 1 hour

It's worth to say that formulas are recalculated when they their arguments changes, so we could use this to force a refresh of the imported data.

Workaround

One way to force the recalculation of formulas with import functions is to concatenate to the URL a deterministic but innocuous parameter.

Example

In the following example, "#rev="&A2 is added to the original URL

A1: `https://en.wikipedia.org/wiki/List_of_gravitationally_rounded_objects_of_the_Solar_System`
A2: `1`
A3: `4`
A4: `=IMPORTHTML(A1&"#rev="&A2,"table",A3)`

Every time that any of the values or A1, A2, or A3 changes, the formula will be recalculated. We could change the value of A2 to "force" a refresh of the table 4 from the URL in A1.

Custom time refresh interval for import functions

To have a custom refresh interval for import functions, use a time-driven trigger script to update the deterministic but innocuous URL parameter.

``````/**
*
* Updates at the interval set in the time driven trigger configuration
* a cell value to be used as a deterministic bu unnicouus URL parameter
*
*/
function forceRefresh() {
//Cell addrees of the deterministic but unnicouos URL parameter
var reference = 'Sheet1!A2';
rng.setValue(rng.getValue()+1);
}
``````

References

Another alternative that does not rely on link modification:

=if(Minute(Now())=Minute(Now()),ImportHtml("http://www.fifa.com/worldcup/standings/index.html?";"table";4),"")

Since `Minute(Now())=Minute(Now())` is always true, the if will always return the ImportHtml

• How do you know that data retrieved is the last version instead of a cached version? – Rubén Sep 3 '16 at 14:23

Click File > Spreadsheet Setting... and check both sheets are in the same Locale and if responses are coming from Jotforms, set the same Locale there too.

Force recalculation of importrange by reinstating the cell formula

Required:

Imported Data - Your target where everything will be copied to.

Imported Data Config - Has the following fields:

```+---------------------------------------------+--------------------------------+
|                      A                      |               B                |
+---------------------------------------------+--------------------------------+
| Import Data from Spreadsheet with the key:  | key                            |
| Import Data from Spreadsheet between range: | A:AA                           |
| Imported Data select columns:               | SELECT *                       |
| Imported Data criteria:                     | WHERE Col2 contains 'XYZ' |
| Imported Data should by ordered by column:  | ORDER BY Col2                  |
+---------------------------------------------+--------------------------------+
```

Script:

``````function onOpen() {
try {
}
catch(err)
{
Browser.msgBox(err);
}

var configsheet = ss.getSheetByName("Imported Data Config");

var configkey = configsheet.getRange("B1").getValue();
var configrange = configsheet.getRange("B2").getValue();
var configselect = configsheet.getRange("B3").getValue();
var configwhere = configsheet.getRange("B4").getValue();
var configorderby = configsheet.getRange("B5").getValue();

var importedsheet = ss.getSheetByName("Imported Data");
importedsheet.getRange("A1").setValue('=QUERY(IMPORTRANGE("' + configkey + '","' + configrange + '"),"' + configselect + ' ' + configwhere + ' ' + configorderby + '")');

// Solution of sourcecode is: http://stackoverflow.com/questions/13631584/how-can-i-force-a-recalculation-of-cell-using-importrange-function-in-a-google-s

Browser.msgBox("Sync Complete!");
}
``````

This allows you to change your formula without editing the script, and make it easier to transfer the script across various sheets.

NOTE: This is no longer required in the New Google Sheets released in May 2014.

• Thanks for posting. You seem to be adding it to quite a few question here on SE. Does it actually help the OP? – Jacob Jan Tuinstra Jan 30 '14 at 20:26

The minute now does work very well (and you can just include that within the formula rather than referencing a cell).

However, with some URLs it does not work and appears to change the link itself and may reference another sheet.

I'm not going to be specific, but a link ending for example in:

``````.....ranking?ranking=xp_total&table=0"&Minute(Now()),"table",4)
``````

will mess up the link itself. Not a full proof solution but still work for probably 90% of the links people use.

• At this time, Google Sheets doesn't allow the use of non-deterministic functions on import functions. – Rubén Sep 3 '16 at 15:02
{"ft_lang_label":"__label__en","ft_lang_prob":0.7087951,"math_prob":0.70760137,"size":1689,"snap":"2019-26-2019-30","text_gpt3_token_len":398,"char_repetition_ratio":0.11275964,"word_repetition_ratio":0.0,"special_character_ratio":0.2214328,"punctuation_ratio":0.14576271,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9598891,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-06-17T13:01:57Z\",\"WARC-Record-ID\":\"<urn:uuid:d0f11843-70d3-4624-a834-7c8f3e6e5e8f>\",\"Content-Length\":\"174409\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:81bd0cba-e18d-4a28-b572-6fb3962b4000>\",\"WARC-Concurrent-To\":\"<urn:uuid:9528bed7-9893-4f08-a834-cd7e3306c96c>\",\"WARC-IP-Address\":\"151.101.129.69\",\"WARC-Target-URI\":\"https://webapps.stackexchange.com/questions/6776/what-are-the-refresh-characteristics-of-the-google-spreadsheet-import-functions\",\"WARC-Payload-Digest\":\"sha1:TOYE4FF4SUNLZ6FPLPG6OQH2TMUNIPBF\",\"WARC-Block-Digest\":\"sha1:YTYMAA563WF2GE7OI4UY5PK65DJ6PPZK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-26/CC-MAIN-2019-26_segments_1560627998475.92_warc_CC-MAIN-20190617123027-20190617145027-00423.warc.gz\"}"}