Exporting from flexTable into Spreadsheet - google-apps-script

I have a dynamic flextable which I would like to use to export into a spreadsheet. How do I pull specific values from the flextable so that I can plug those values into a Google Spreadsheet? Some of the cells are just text, some are TextBoxes.
It is a 3 by 3 flextable (ultimately) that can be filled with a number of items based on the buttons selected by a user.
I wish I could show the code, but the project is super confidential and I can't show anything on here. Sorry!

Related

Use button in Google Sheets to open the pre-filled Google Form from dynamic hyperlink

Issue:
I have a Google Form, let's call it "Stock". The form simply records new entries of stock into the Google Sheet "Stock Form Responses". In this sheet, there is a field called Stock Number which has to be unique. In order to cut out human error in the process of assigning a new stock number to the rows of data added through the form, I have created a very simple formula in a cell:
=max('Stock Form Responses'!B:B)+1
This does exactly what I need it to do, and tells me the latest stock number, and adds one to it, ready for the next addition via the form. I then use this code in another cell (G9 of the sheet called "Control"), to pass that number to the prefilled form link for my form, like this:
=concatenate("https://docs.google.com/forms/MYFORMLINK/viewform?usp=pp_url&entry.465281926=",D10)
This is where D10 from the Control sheet stores the previous calculation of what the next stock number should be.
All of this works great so far, and everything works fine.
Problem:
Google Sheets has this really annoying feature where you can't just click a link in the sheet, you have to hover over it and then click the attached link. It's frustrating, and I'm trying to simplify and clean up steps. I simply want to pass the URL stored in G9 to an action attached to a button, let's call it AddStock. How do I do this?
I've been trawling the internet for hours trying to work it out, and can't seem to figure it out myself (admittedly I have very limited coding understanding, but people keep talking about popup blockers, etc).

Google Forms and Responses for Multiple Checkbox Grid

I'm looking for a way to eliminate checkboxes from a multiple-choice grid after someone submits a form. The multiple-choice grid option allows the user to select any box from any row and any column.
for this example, I have a 5x5 grid and if a user selects one or more checkboxes from any column or any row I would like for the form to show only the boxes that are available after each form submission.
so if row 1 column 2 is checked and submitted, the next time the form is viewed it should show row 1 column 2 as unavailable. How can I accomplish this using Google Forms and Google Sheets? Is there a formula that is needed in sheets that will get the desired results?
Your goal is not possible because when using Tick box grids you can only set or eliminate a whole row/column. The methods setRows(rows) and setColumns(columns) from the class CheckboxGridItem will accept an array of values to build the Tick box grid, there is no method to set/eliminate an specific checkbox/value.
As a recommendation, depending on your project and what your final goal is, you could have the checkboxes directly in your Spreadsheet.

G Sheets Table of Contents Script

For Google sheet workbooks that have several sheets, I create a Table of Contents sheet that lists all of the sheets in the workbook to increase ease of use for users.
I have looked for an add-on, macro, or script that can speed up the process. No dice. Any ideas for how to automate the process of creating a new sheet that lists the names of all of the other sheets (One sheet name per cell) and then automatically links the cell to that sheet?
Just to expound, this is a great solution except it will not update when you add new tabs or rename/ reorder current tabs. The only solution I could find is to create a simple checkbox trigger.
First I added a checkbox on my Table of Contents tab page. Then I added the script above except, instead of SHEETLIST() in line one I added my checkbox's cell number - for example, SHEETLIST(B3).
Then, I put the formula; in which populates the two columns of data - Name & #GID. In another cell (with plenty of room to list all the tabs) I put the top =ARRAYFORMULA... (not the one with the VLOOKUP) but, again, instead of empty parenthesis after SHEETLIST() I input my checkbox's cell number in both places, like below:
=ARRAYFORMULA(HYPERLINK("#gid="&
QUERY(INDEX(SHEETLIST(B3);;2); "offset 1");
QUERY(INDEX(SHEETLIST(B3);;1); "offset 1")))
I then hid the columns with the NAME & #GID data so you can only see the hyperlinked Table of Contents.
Now, whenever I update my tabs I just click the checkbox and it forces everything to reload. Not completely automatic/ dynamic but the best solution I could find.

Script for copy over values only via button

In this sheet, I have some boxes which calculate information, (Columns K:BO)
I have drawn a button next to each box (ADD LINE)
I need a script attached to the button that will transfer only the information in the coloured cells from each box across to a "Collection Box' in Column (DC:DK)
Each box calculates differently and sometimes I may not need information from all boxes at once hence a button for each one.
The goal is to be able to organise the information so I'm able to copy and paste the information the from the Collection Box (DC:DK) as needed so I don't have to painstakingly extract the information bit by bit
For Example...
I have made a box in Columns CF:CN which only mirrors the information I require.
Problem is when I'm not using certain rows the information gets hard to read because of the cluster,
As you might see I've tried to overcome this with basic cell formatting to highlight the information that I'm using at the time
Also the cells in columns CF:CN has cell references applied so I can change the output in columns as needed.
This would be ideal for me to keep.
I'm not sure on the boundaries of the script, but is there a way that when the information is copied to the collection box so it can still utilize the cell reference to change the information without me having to re-enter?
Here is Sheet
Information is in Update Price Tab
https://docs.google.com/spreadsheets/d/1UdYCqgKEGJeh4KajxQWfTCi-JRpQgGM7435Q_VwHIH8/edit?usp=sharing
a script for copy-over values only is:
function moveValuesOnly() { var ss = SpreadsheetApp.getActiveSpreadsheet();
var source = ss.getRange('Sheet1!A1');
source.copyTo(ss.getRange('Sheet1!B1'), {contentsOnly: true}); }
this particular one will copy values from Sheet1!A1 to Sheet1!B1 if attached to a button

How can I link the value of a cell to a sheet?

I'm having some trouble with this exercise, I have a data validation list in a cell (A,B & C) and also 3 sheets with those names. What I'm trying to do is to link the value of that cell so I can be re-directed to the Sheet that has it's name in the cell
What you are trying to do is impossible - data validation items cannot be linked to a browser action.
One possible workaround would be to create a range with each cell containing a hyperlink formula with the name and url of the sheets you want to link. Then you would create a data validation based on this range and users could click on the link after selecting from the dropdown.