I have a column of links copied from the web, links are copied with the names of the original links. They have URLs inside.
How I can remove names, and get the column of URL addresses?
You can do that with the RichTextLinks custom function. Install the function in Extensions > Apps Script, and then put a formula like =RichTextLinks("A2:A") in row 2 of a free column.
Related
Looking to extract the author name from articles. Currrently using =IMPORTXML(G2,"//*[#class='author-details']")
When I do this, it creates 4 cells underneath which contain the word 'By', which I can't get rid of.
Very new to code - what am I doing wrong?
Attached example: https://docs.google.com/spreadsheets/d/1Mi1D5G1-_gNsQwVQ6I_ealDqcWixKA2p-hFqJpjlGt4/edit?usp=sharing
You can use:
=index(IMPORTXML(G2,"//*[#class='author-details']"),1,2)
This displays only the first row of the second column of what is returned. The information You are after.
Edit:
Additionally, since you highlighted that you want author name. If all the names are in that format "By FIRST LAST #TwitterHandle Affiliation" then you can use this to get just the author's name:
=trim(split(right(index(IMPORTXML(G2,"//*[#class='author-details']"),1,2),len(index(IMPORTXML(G2,"//*[#class='author-details']"),1,2))-3),"#",true,true))
Will likely look like voodoo but paste it in, it works. It removes the first 3 characters ("By "), splits the text at the "#" symbol, and then keeps only the text on the left side of it, the name.
Now that it is possible to have multiple links within the same Google Sheets cell, I'm trying to automate some grunt work with a Mail Merge add-on. The add-on takes multiple "attachments" that are hyperlinks separated by commas and does a great job of mailing them out if I copy and paste the links in manually.
I'm using this to build individual unique emails of tests for my students so I can type in the sheets Questions A, B and Q for student 1, Questions B, C and Q for student 2. I use VLOOKUP to grab the links from a separate page that replaces Question A with the hyperlink for Question A, etc. Then I used CONCATENTATE with commas and spaces between links to build the cell that has the 3 "attachments" in it.
But it only sees the text and doesn't turn it into an active hyperlink.
If I make a copy of that CONCATENATEd text and paste as value, then go in and press the space bar after the commas, the links turn blue or "live", and then it works.
I would love to automate this. Any suggestions?
I'd be interested in automating this as well but it seems unavailable at the moment. One possible workaround (albeit a less elegant one) is to use the plain URL itself (instead of hiding it in a hyperlinked text) and separate the concatenated links by a comma or a carriage return. Gmail tends to auto-convert plain URLs into hyperlinked text. You could try a test email to yourself via the above method to ensure the concatenated URLs are converted to clickable links.
I have a DSV file and each row corresponds to one instance/piece of text as normal. Specifically, I have my own delimiter ### instead of the default (i.e., comma ,). However, when I open the DSV by using Google Sheets, these tools always display the DSV file by splitting automatically by default delimiter. It causes a mess because some columns may contain several commas.
How can I disable the trigger that splits the text into columns automatically and only use my own delimiter?
My DSV is like below:
a###b###c###d,e,f,g###h,",",j
h###i,j,k###l###m###n,"[o,p]"
q,r###s###c,u###v,w###x,y,'z,'
As suggested, I have tried to copy the content directly to a newly created Google sheet, however, I got the error as below due to the size of the content.
There was a problem
Your input contains more than the maximum of 50000 characters in a single cell.
With File > Import > Upload > Drag one can choose one's delimiter (though not, as far as I am aware, as in Excel the option to "Treat consecutive delimiters as one"):
So, depending upon your specific file, you may find the result this way is what you want - provided you are prepared to delete a couple of blank columns for each set of ### (if not choosing a single character rather than ### in the first place).
if you import your CSV data into Google Sheets via copy-paste you can press this combo right after importing it:
LEFT ALT + D
E
ARROW UP
ARROW UP
ENTER
and type in your ###
Need to write a macro for importing a table from all URLs present in column A of Symbols sheet, each URL table should be written to a new sheet with the sheet being named as per the names in column B of Symbols sheet.
Using the below formula to extract table information from URL, which is working.
=IMPORTHTML(symbols!A1, "table",1)
=IMPORTHTML(symbols!A1, "table",3)
A sample sheet URL is below.
https://docs.google.com/spreadsheets/d/1uJPjfAZLRCwafetbH4-nPJPSpTvvgixlFvGG6gYITBU/edit?usp=sharing
Need to customize a few rows and columns which are not required. I believe this can be done by recording a macro and copy-pasting those modification lines to macro.
Edit: I am able to achieve this in MS Excel, one click does the job of importing table, creating a new sheet, copying the table, little formatting. Want to achieve the same in googlesheets.
check the INDEX and ARRAY_CONSTRAIN functions (probably also QUERY and FILTER function too) which are able to trim off the input exactly as you need to.
Does anyone know if there is any official documentation for google spreadsheet embed URL paramaters?
That is, given an embed URL from Google Sheets like this:
https://docs.google.com/a/aicr.org/spreadsheet/pub?key=0AhExuVBhVYT1dGxxejBmUHAzYUhGb25veTRkdW1YekE&single=true&gid=1&output=html&gridlines=false
What do the arguments do, and
What other arguments are available, that aren't included by default?
After much digging and searching, I have found:
Some parameters don't seem to do anything (&single=true, &embedded=true)
Some parameters are declared confidently in google search results, but don't work (&gridlines=false)
Some parameters don't seem to appear in any searches I have done (&output=csv)
... and no search I have done has produced anything even remotely approaching either of:
an official, google-maintained document for embed URLs
a code view of the code that is used to parse the embed URLs
By trial and error I have found:
&key=[ID]
google sheet ID
&single=[true|false]
true: ??? (present when I have published only a single sheet)
false: ???
&gid=[#]
sheet ID ??? (present when I have published only a single sheet)
perhaps this can be used to specify a sheet and range when your entire google sheets doc has been 'published to the web' (instead of just one sheet from your doc)
&range=[CellAddress1:CellAddress2]
specify a range of cells to include, eg "B1:C20"
if 'widget=' is false or not present, suppresses display of the usual google header & footer info
if the range spacified is larger than the published sheet, displays only the sheet while still suppressing the header and footer.
&embedded=[true|false]
true: ???
false: ???
this item is included in the embed code offered from within google sheets (set to "true"), but doesn't seem to have any effect.
&widget=[true|false]
true: display entire shared item. Overrides "range=". Does NOT include the google disclaimer footer.
false: include google disclaimer footer in output (unless 'range=' is also present)
&output=[html|txt|csv]
html (default): output as an html table within code that also includes Google tracking code
txt: output the content of the specified range or sheet as tab separated text
csv: output as csv
&gridlines=[???]
this apparently used to work but doesn't work for me.
To suppress gridlines in embedded sheets I set borders on all cells, then color the borders to match the sheet's background color (eg solid white borders on a white-background sheet).
Here are some of the parameters I found for Google Docs (thanks goes to Joel http://obstruction.tumblr.com/post/60784440737/google-docs-url-parameters-rm-minimal-rm-full):
Google Docs URL parameters:
rm=minimal
rm=full
rm=embedded
rm=demo
rm=(render mode)
ui=2 (select the interface version)
chrome=false (full screen mode)
frameborder=(size of border)
q=(Whatever) Search Query
gid=24 (Which sheet you want to display)
widget=false
single=true
range=A2:AA26 Output=html
format=(export spreadsheet)
format=xlsx
format=csv
widget=false
width=(width)
height=(height)
viewer?
start=
channel=
ibd=
client=
I've been looking for the same thing! One more URL parameter I have found useful is
&rm=[minimal|?]
minimal: hides the top menu and cell inspector, but still shows row numbers, column letters, and the Add More Rows feature at the bottom.
This resource describes some of the parameters, though I can't vouch for its accuracy.
http://www.goopal.org/google-sites-business/google-spreadsheets/spreadsheet-output/publish-spreadsheet#TOC-Other-Export-Parameters
The most helpful list of parameters I found comes from Steegle.com.
You can use the htmlembed URL to display just a range from a Google Sheet - here's how to structure the URL
https://docs.google.com/spreadsheets/d/SpreadsheedID/htmlembed?single=true&gid=SheetID&range=D15:E15&widget=false&chrome=false&headers=false
SpreadsheedID should be the long letters, numbers and characters you get in the normal URL
htmlembed is for sheets you have not published: use pubhtml instead if you have chosen to publish the sheet (if you want the public to see it it's the best way
single never been sure what it does, but we think it helps with only showing a single sheet instead of multiple sheets
SheetID is the sheet number you get in the normal URL after the ?gid= (this is not the sheet name you have specified but the automatic number that Google Sheets provides)
range lets you specify the range of cells you want to display
widget lets you choose whether to display the sheet tabs at the bottom
chrome lets you choose whether to display the spreadsheet title (& sheetname) at the top
headers lets you choose whether to display the spreadsheet title at the top
Source: https://www.steegle.com/google-sites/how-to/insert-websites-apps-scripts-and-gadgets/embed-google-sheet-range