Google Sheet data update before opening document - google-sheets

Is there a way to update spreadsheet data automatically before opening the spreadsheet ?
Let's develop a little bit. In a main Spreadsheet I'm doing some IMPORTRANGE to get data from 2 other Spreadsheets (these data are refreshed twice a day). Then I used the imported data to present a kind of summary / dashboard with some complex formulas.
When I open the main spreadsheet, it takes looooong time to update.
I noticed that this long time is driven by the change of imported data.
Is there a way to do this update offline and not trigger a calculation when opening the document ?
Hope I'm clear, don't hesitate to contact me for further clarification.

I think this can be done with a script, but this is not my area (I found a solution on an external link, but don't want to post it here):
function myFunction() {
SpreadsheetApp.getActive().getRange('A1').setValue('IMPORTRANGE('https://docs.google.com/spreadsheets/d/abcd123abcd123', 'sheet1!A:B')')
}
Then within the current project's triggers, select a 'time-driven' event source based on minutes of your choice.

Related

Is there a way I can Export and stack Salesforce data to a google sheet?

I am trying to create a google sheet that updates and stacks the data from a Salesforce report on a daily basis. I tried to use the Data connector for Salesforce add, it exports the data just fine but when I change the date, it replaces everything it exported the first time. What I wanted it to do is to Extract the data today, store it in the sheet, and Export another time tomorrow adding the data to the existing one. I have no coding knowledge and SQL stuff and I'm trying to learn things to help my work.
Your response is highly appreciated

How to extract data of previous week based on drop down from the Yahoo Fantasy Football

Hy, I am using Yahoo Fantasy Football and I have design Google Sheet to get the score data which is the working fine. The link to the sheet is as under.
Google Sheet Link
I have changed the permission to Editor. I have made a drop-down which holds the information of Week numbers. Basically, my idea is that by choosing the week number I want to populate the data from yahoo fantasy football. For importing data, i am using this command.
=importhtml("https://football.fantasysports.yahoo.com/f1/683375","table",1)
and this command is working well.
I tried it by using the same command but it does not works for the week numbers. The source of the page is as under.
so according to the given picture, here is the week number, I want to implement the same in the google sheet by using the dropdown. I have implemented the drop down but it does not work. Is there a way to interlink both using scripts or command so from google sheet when I chose week from the drop-down the concerning data should be populated? please take a look at the Google Sheet given above. I am also getting this error, while it was working fine before, how can it be resolved also.
Thanks
IMPORTHTML cannot retrieve elements dynamically inserted by a script. In your case the content on Week matchups is inserted dynamically and therefore will not be retrieved (it will return empty). Moreover, IMPORTHTML olny gets data from tables or lists and if you inspect what it seemed to be a table in Week Matchup is just actually a series of divs. If the content would not be inserted dynamically, to get the data from these divs you would need to use IMPORTXML.
If you still want to retrieve this information I am afraid that you will need to look for other web scraping techniques.

Persist values in spreadsheet

I am using the Google Analytics Spreadsheet add-on to fetch report data into a spreadsheet. The data from Google Analytics is pulled daily in my spreadsheet and shown in an Overview sheet. However, I would like to store the values for later reference.
Google Analytics add-on sheet
My idea is to store all daily values in one sheet and fetch these values via INDEX/MATCH.
I would like to "persist" the row of the current day after the Google Analytics report is run, to store this value for the future.
Any suggestions how to do this?
The Google Analytics Spreadsheet Add-on doesn't have an append feature, so you cannot keep data from previous runs and add data from new runs.
However, you don't need to: since you're going to do a lookup (index-match), it doesn't matter on which rows the data sits, since you're lookup is going to find it. So you can build your reports to get data from the last N days (eg last year with Start Date = TODAY()-366 and End Date = TODAY()-1 (not getting data from today due to GA data processing latency). Traditionally when doing reporting you're interested in a time period that's relative to now (eg "how has it been going for the last 12 months?"), hence the above method would be suitable.
If you want an append feature, you need to use other solutions, like SuperMetrics.

Archiving data in google sheets - multiple rows and multiple columns

Hello everyone I am attempting to modify a script that I found in this post (Archiving in Google Spreadsheets with Date Using Apps Script). The goal is to set it up on a time trigger/button to a specific range of cells into a sheet within the same workbook. When it is archived it should overwrite the previously archived data within the range of cells on the "archive" sheet. I have played with this script with this suggested script from this post and removed the "delete" and "priorities" components of the action, but am still having problems getting it to simply overwrite what is already there. I will continue to work with it withing my limited knowledge as I continue to learn, but would greatly appreciate any help or tips. Or if their is a preexisting code that would serve the purpose that I have missed I would love to hear about it.
Thank you for any insight you can provide and for all the help in the past.
*and thanks to Jad and the User1786546 for the original posting.
I had a quick look at the script post.
If you wanted it to delete the archive data before writing to it, you might need to clear the contents of the sheet first before writing the data.
targetsheet.clearContent();
This will clear the whole target sheet, (the target sheet is a variable in the script you linked to, this name can be changed), including column headers.
If this is undesirable, then you may wish to use
getRange().clearContent();
Please see this link for more info.
https://developers.google.com/apps-script/reference/spreadsheet/range#clearContent()
If you still need further help, try sharing a dummy spreadsheet, with realistic data and sheets.

Ranorex to read data from an Excel spreadsheet

I have an Excel spreadsheet with lots of data that needs to be entered to a desktop app.I do not want to manually type in all this information because it can take me forever to do that. Is there a way i can make a recording on ranorex for only one row (first row) of data and somehow instruct Ranorex to follow what i did on the first row to load the rest.
Your question isn't very clear, so I'll try to answer what I think you're asking.
Ranorex has built-in support for working with Excel spreadsheets.
Basically, you need to create a data source that uses your Excel spreadsheet file. Ranorex will then be able to map the values in each row to module variables. You can find the Data Sources dialog by right-clicking on a Test Case in the rxtst file.
Ranorex will automatically rerun the test case for each row in the spreadsheet. You can limit it, if you want, to just the first x number of rows in the Data Sources dialog.
You can find a lot more info about this on Ranorex's User Guide in the Data-Driven Testing Lesson.

Resources