Forum Discussion
=WEBSERVICE() Refresh
I've got a workbook with literally hundreds of cells (and growing) in multiple worksheets using =WEBSERVICE() to obtain data from an API.
When I open the workbook, the cells all show #VALUE. When I click on a cell and edit it, or just F2 and return, the #VALUE is replaced by the value returned by the API.
Is there a way to automate this refresh for an entire sheet or the entire workbook instead of a cell-by-cell update. I suppose I could write a macro to walk from cell-to-cell and sheet to sheet, refreshing cells as it progresses, but am hoping for a slightly more elegant solution...
- I'd suggest either:
- Do a global search and replace, search for = and replace with = (click options and select to search in workbook)
- Add something to the cells which contain WEBSERVICE to make them recalculate each time, like =WEBSERVICE(...) + 0*NOW()
4 Replies
- JKPieterseSilver ContributorI'd suggest either:
- Do a global search and replace, search for = and replace with = (click options and select to search in workbook)
- Add something to the cells which contain WEBSERVICE to make them recalculate each time, like =WEBSERVICE(...) + 0*NOW()- ruben_34Copper Contributor
I was having the same problem.
At first I was afraid that every time a cell was changed WEBSERVICE() would make a new request and quickly block the API (I have a daily limit), then I found out the opposite was true, no update.
Ideally it would be nice if there was a "update frequency" parameter in the function, or that it refreshed along side the power query and queries stuff.
JKPieterse your "=WEBSERVICE(...) + 0*NOW()" is automatic and incredibly elegant, works like a charm. - MartyKCopper Contributor
Jan Karel --- I asked for an elegant solution --- global search and replace "=" with "=" certainly qualifies!!
Thanks much for the great suggestion.
- JKPieterseSilver ContributorExcellent, glad you like the suggestion :-)