Importing Earnings Date

Talk about anything at all....
Post Reply
crusader
Volunteer
Posts: 506
Joined: Sun Jan 20, 2008 5:06 am

Importing Earnings Date

Post by crusader »

I posted the following to Google Sheets Community for help; however, my post was removed for violating "Community Policy." I can't figure out what policy I violated, and there doesn't seem to be a way to ask. So I am requesting help here.

I am using
=query(IMPORTHTML("https://www.cnbc.com/quotes/?symbol=cp&qsearchterm=&cp", "table", 1))
to import Earnings Date (under Events) from CNBC.
I need help configuring the last part of the formula (the part after "table"). I only need to import the date.
Thank you.

Any help I can get from this forum will be greatly appreciated.
LO 7.x on Linux Mint
In a world without walls, who needs Window$.
A candle loses nothing by lighting another candle.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Importing Earnings Date

Post by Villeroy »

A html page can have more than one table, analog to text tables in Writer.
... ,"table", 1 imports the first table of a html page.

A html list is a different thing. It is analog to lists in Writer.
... ,"list", 2 imports the second list of a html page.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
crusader
Volunteer
Posts: 506
Joined: Sun Jan 20, 2008 5:06 am

Re: Importing Earnings Date

Post by crusader »

Thank you for the information, Villeroy.

What I am looking for is assistance in getting the [whole] formula correct. What complicates figuring out the table number is the Earnings Date is located on the Summary tab. Addressing the tab in my formula is part of my challenge.

Any help I can get in putting the formula together will be greatly appreciated.
LO 7.x on Linux Mint
In a world without walls, who needs Window$.
A candle loses nothing by lighting another candle.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Importing Earnings Date

Post by Villeroy »

The spreadsheet client does not run the JavaScript which is required to fill the table.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
crusader
Volunteer
Posts: 506
Joined: Sun Jan 20, 2008 5:06 am

Re: Importing Earnings Date

Post by crusader »

Villeroy wrote:The spreadsheet client does not run the JavaScript which is required to fill the table.
Villeroy, if I understand you correctly, LO may/will not accommodate the formula I am seeking to establish. I am planning to use this formula in Google Sheets.

Any help I can get will be a step forward since I can't get any help from Google Sheets. This also explains why I posted this request under "General Discussion" as opposed to under "Calc."
LO 7.x on Linux Mint
In a world without walls, who needs Window$.
A candle loses nothing by lighting another candle.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Importing Earnings Date

Post by Villeroy »

I can only guess that Google Sheets does not interprete JavaScript. If you look at the html source, the summary table includes JavaScript references instead of data.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply