Google Sheets embed into website with formatted table - google-sheets

I usually record students marks in a Google Sheet. However Google's embed provides a "mirror" of the Sheets and looks exactly like the sheet. This means I have to resize the cells so as to show the complete names and perform formatting. Is there a better way of displaying this information without resizing the cells. I need a method which automatically displays a the data without any configuration. If possible without the use of Google Apps Script.Here is the sample data. The data will be sent to parents and will also be printed.
https://docs.google.com/spreadsheets/d/1nKcShloX5R4OvhuEtRogCHG18V1YTR5v9Hb19Jobm88/pubhtml

You can use Google Visualizations API. This automatically resizes the cells and produces a neat and minimal looking table.
This is the usage:
https://docs.google.com/spreadsheets/d/<sheet-id>/gviz/tq?tqx=out:html&tq&gid=2
So in your case:
https://docs.google.com/spreadsheets/d/1nKcShloX5R4OvhuEtRogCHG18V1YTR5v9Hb19Jobm88/gviz/tq?tqx=out:html&tq&gid=2
The difference is very clear.

Related

How to retrieve data to Google Sheets

I've tried to get table's data from https://www.set.or.th/th/market/index/set/agro/agri
to Google Sheets
=IMPORTHTML("https://www.set.or.th/th/market/index/set/agro/agri","table",1)
Changing list to table and still unable to get the data.
My expected output in Sheets is
EE bunch of numbers
GFPT bunch of numbers
LEE bunch of numbers
. bunch of numbers
. bunch of numbers
VPO bunch of numbers
I'm writing this answer as a community wiki, since the issue was resolved from the comments section, in order to provide a proper response to the question.
The content you're trying to extract, loads with JavaScript and IMPORT functions can’t extract content that loads with JavaScript. You can check this article.
If you click on the ‘Lock’ icon beside the browser’s address bar, select ‘Site settings’ and set JavaScript to ‘Block’. Reload the page and as you can see in the screenshot below, the site needs JavaScript enabled to load certain content.

importxml function in Googlesheet

First of all, I'm completely incompetent and my hours-long attempts at trying to make this work have been fruitless. So, please, there's someone that can help me.
I have
table id="..........." tablesorter class="........"
They are in the same line of code ad I'm able to scrape until the first element. For me it's important to scrape by the second one. I'm tryng different way but nothing
investing
In the image, in the part highlighted on the left where there is the drop-down menu, it's possible to select the different American markets (Nasdaq, DowJones,
S&P500 etc.). When I select a market other than DowJones, the URL of the page always remains the same, while the part that I highlighted on the right changes (tablesorter class = "............").
In my sheet, I've done this but it can't allow me to scrape different market (only the default table thay you see when open the webpage)
spreadsheet
Your main problem is that IMPORTXML can only retrieve information from static content in websites. Therefore, any content inserted dynamically can't be retrieved by this function.
In your case, you can check what content is not static by heading over to the website https://it.investing.com/equities/americas and then disabling JavaScript on it. To do so if you are using Chrome please follow this guide.
As Javascript will add dynamic content to the site, when you disable it you will observe that the information subject to change with the dropdown doesn't actually change which means that it was dynamically inserted and therefore can't be accessed by IMPORTXML. I have attached an image below showing this.
As a workaround to this you will need to use other web scraping techniques.

Looking to add a dynamically adding rows table with multiple fixed columns which can fill value's to Google form and bring response to Google Sheets

I'm trying to create a table with editable cells in a google form that lets people enter their response. It would have multiple fixed columns and dynamically adding rows for more response.
Sample image of the desired table in google form for response
I am naive about building google forms and running scripts/codes on forms. A detailed explanation of steps will be of good help.
Thanking in advance to wonderful people who do such fabulous work
At the moment it is not possible to insert tables in Google Forms, not even via Apps Script, but since you are interested in learning about Forms and Scripts I would recommend you start with this quickstart about managing Form responses.
If you explain perhaps with more detail what your goal by inserting the table is, maybe there is a way with the available options in forms to achieve it.

Google Forms/Sheets

I am trying to find a way to link several google forms to one google sheet without separate tabs. I am creating a database so I want different employees to be responsible for different sections of the same spreadsheet.
You need to use "IMPORTRANGE". I had to do that recently. https://support.google.com/docs/answer/3093340?hl=en You have to tell the receiving sheet what range of the feeder sheets to import and then give permission.The trick is, if someone adds columns to a feeder sheet, you have to make sure the data is not "overlapping" in the receiving sheet. Otherwise, you'll get an error.

Query data from Google Spreadsheet generated by Form

Currently we're having a request to integrate the Google Form functionality into our system. I'd done some searching on the web, and found that there's no way we can change the post processing of a Google Form unless we do some heavy customization using 3rd party tools.
Thus i have an idea that, when someone fill in the Google Form, he/she will need to fill in a 'user id' in the form. This will be collected as a field in the Google Spreadsheet generated by the form.
In my back end application, i would query the spreadsheet and look for the user id field input by the user. Then i would be able to know whether he/she completed the form or not.
I'm trying to look at the Google Docs API for the spreadsheet and found that there are list-based feed and cell-based feed but i'm not sure which one can achieve what i want to do. Anyone has experience in this can shed a light?
Thank you
Think of a list based feed as being like SQL. You can read rows, insert rows(at the bottom), delete rows and update rows. - you can only store data, not formulas. In contrast, A CELL based feed lets you read and write to cells, any cell, using the cell reference (R1C1 style). CELL FEED give you more control, and includes batch updates.
some sample CELL FEED code is here:
http://code.google.com/p/gdata-java-client/source/browse/trunk/java/sample/spreadsheet/cell/CellDemo.java?r=51
Another option is too use google apps script, this is maybe less work if you just want to extract data. The html service is probably the tool for the job https://developers.google.com/apps-script/html_service - as you can dont need OAuth to do the read.

Resources