External API call in Google Spreedsheet is possible?

There’s a way to make API calls and have the results go into a spreadsheet – the only way I know to do it is create/open the target spreadsheet, go to tools and then Script editor, and use this as a bound script: function Maestro() { var ss = SpreadsheetApp.getActiveSpreadsheet(); //get active spreadsheet (bound to … Read more

Generate all possible combinations for Columns(cross join or Cartesian product)

in post-pandemic new world we can solve this with: =INDEX(FLATTEN(A2:A3&” “&TRANSPOSE(B2:B4))) to account for future expansion we can do: =INDEX(FLATTEN(FILTER(A2:A; A2:A<>””)&” “&TRANSPOSE(FILTER(B2:B; B2:B<>””)))) for 3 columns: =INDEX(FLATTEN(FLATTEN( FILTER(A2:A; A2:A<>””)&” “&TRANSPOSE( FILTER(B2:B; B2:B<>””)))&” “&TRANSPOSE( FILTER(C2:C; C2:C<>””)))) 4 columns: =INDEX(FLATTEN(FLATTEN(FLATTEN( FILTER(A2:A; A2:A<>””)&” “&TRANSPOSE( FILTER(B2:B; B2:B<>””)))&” “&TRANSPOSE( FILTER(C2:C; C2:C<>””)))&” “&TRANSPOSE( FILTER(D2:D; D2:D<>””)))) for more see: https://stackoverflow.com/a/74160711/5632629

How to parse an HTML string in Google Apps Script without using XmlService? [duplicate]

I made cheeriogs for your problem. it’s works on GAS as cheerio which is jQuery-like api. You can do that like this. const content = UrlFetchApp.fetch(‘https://example.co/’).getContentText(); const $ = Cheerio.load(content); Logger.log($(‘p .blah’).first().text()); // blah blah blah … See also https://github.com/asciian/cheeriogs

How do you create a “reverse pivot” in Google Sheets?

I wrote a simple general custom function, which is 100% reusable you can unpivot / reverse pivot a table of any size. In your case you could use it like this: =unpivot(A1:D4,1,1,”customer”,”sales”) So you can use it just like any built-in array function in spreadsheet. Please see here 2 examples: https://docs.google.com/spreadsheets/d/12TBoX2UI_Yu2MA2ZN3p9f-cZsySE4et1slwpgjZbSzw/edit#gid=422214765 The following is the … Read more

Automatic colouring of a specific value wherever found in a table [closed]

In the dropdown menu, Format->Conditional formatting… Then set your rules and your color. You can select multiple cells and do this also. Edit: That is the extent of what you can do with coloring. You can maybe find a complex formula to find the minimum of the cells, and then if that matches what is … Read more

How to get the current time in Google spreadsheet using script editor?

use the JavaScript Date() object. There are a number of ways to get the time, date, timestamps, etc from the object. (Reference) function myFunction() { var d = new Date(); var timeStamp = d.getTime(); // Number of ms since Jan 1, 1970 // OR: var currentTime = d.toLocaleTimeString(); // “12:35 PM”, for instance }

GoogleFinance often returns #N/A and internal error messages while getting stock quotes

you can either use alternative to GOOGLEFINANCE (depends on what exactly are you up to) or if you want to stick with it you can wrap it into IFERROR: =IFERROR(GOOGLEFINANCE(your_formula_here), GOOGLEFINANCE(same_formula_here)) or even: =IFERROR(IFERROR( GOOGLEFINANCE(your_formula_here), GOOGLEFINANCE(same_formula_here)), GOOGLEFINANCE(same_formula_here))

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)