How to extract data from online react-table to csv - excel

I would like to have some way of obtaining the data from NHL.com's stats page which I believe is a react table and has no tag. An example would be the following:
http://www.nhl.com/stats/team?aggregate=1&reportType=game&dateFrom=2017-10-22&dateTo=2017-12-07&gameType=2&filter=gamesPlayed,gte,1&sort=points,wins
I have tried making an Excel query, but the table doesn't show up in Excel's web browser. I tried just manually copy-pasting from the webpage to Excel/Sheets, but all the data is pasted in the first column.
Any way of getting this information to a csv would be appreciated, especially some sort of automated way given a set of filters to pass into the URL.

Related

How to get bitcoin price using power query?

I had this question if you can get bitcoin price history right into excel with power query. The price history is shown in Yahoo finance at the address https://finance.yahoo.com/quote/BTC-USD/history?p=BTC-USD. A lot of people use VBA to get data into excel but I don't like using it. Power query more simple.
This is can be done in power query as long as the site has data in a format that is like a table.
FYI you can bring in other formats too like JSON data.
In excel go to Data> Get & Transform Data and use the drop down.
in the next window paste in the website. https://finance.yahoo.com/quote/BTC-USD/history?p=BTC-USD
Some websites have multiple tables. choose the table that you want.
Next you can transform the data how you want such as filter, drop columns, calculate new columns as you see fit. Once done close and load the data.
You might want to set a data refresh interval that is inside the properties (see image below)
Do you like the answer, then upvote it, Enjoy.

NodeJS monitor for Google Forms submissions

I am trying to set up a NodeJS application that monitors for new responses on a Google Form so that they can be displayed on a dashboard.
My original idea was to use the responses spreadsheet, but I can't find a way to convert it into readable JSON. The next problem is identifying which responses are new. The storage of the app is very very limited and having a copy of the spreadsheet is out of the question. What I wanted to is just ping the table every 1 hour and if there's a new response, run some code to print the data.
I am open to any ideas or suggestions!
You can maintain a counter in the app, or in a shared file/database. The counter will point to number of rows seen in the spreadsheet. Next time you query the spreadsheet, you'd know rows after counter are new.
As per extracting the data, if you have the sheet as a file, you can use some package like xlsx to parse the sheet into JSON. If not, then you can fetch the spreadsheet from Google APIs in JSON format.

Excel 365 Get Data from web-based Json API issue

I am trying to Get & Transform data from a web API.
When I go to the URL through a browser I can view the data.
I copy the URL. Open Excel 365, click get data ...from web and paste the URL.
It looks like Excel is recognizing that it is a Json, because power query has Json.Document.....
However, it is not letting me view the actual data, each line only has "Record"
When I try Close & Load it loads [Record] into the rows in column A.
Any ideas on what is going on?
Kind Regards,
Dom
That's typically how data gets loaded in Power Query. Record's or Lists can be expanded to get the data inside them.
There are 2 things that you will want to based on what you want.
Click on any one record to see the data in just that one Record
Click on the Expand button on the column header to see data of all the Records in their respective rows. Please check out this answer
If you're not able to figure it out, please post an image.

How to transform data of this text file to an excel table

I'm currently setting up a new Poll Result for a Webinar Survey in Webex Application.
I will only able to collect Result in this PollResults.txt (notepad file) and will need to transform this data into an excel table for further analysis. As i will have multiple Poll Results to collect everyday, therefore transforming them into a data table would helps a lot for further compilation/analysis.
I'm thinking about creating an VBA to transform accordingly, but currently has no idea how should i start.
I will share the download link for both of my raw data and expected result file in the download link, appreciate if anyone could guide me on it.
Link to download files
Thanks in advance!

Using a JIRA saved filter with REST API and Excel

I have a report that I need to update in Excel many times a day using statistics from JIRA. If I can import these directly with code I would save a lot of time and effort.
Is it possible to use a saved JIRA filter in conjunction with the REST API function to import the results to Excel using a VBA macro?
This is a solution does not use REST API, but it may work for you. This is a workaround I am using so far and it works:
Run the Filter in Jira
Export the result list into an excel file using the Export CSV file with the option current field (to avoid having unnecessary fields) and with the right button of mouse select: Open in a new window
Now you will see the URL associated with your filter in a new window of your browser. Your filter is represented by a Filter ID, therefore the query will be always the same.
Go to excel and use the URL as a hyperlink
Every time you click on the hyperlink it will download the file from Jira. You need to have a Jira open sesion in your browser.
Create a VBA marco that click on the hyperlink for downloading the file.
Use Power Query for example for loading the file from the download folder location into a worksheet. Power Query is a new excel feature. Power Query is an ETL tool integrated into excel for loading files and processing them.
The steps 6-7 automates the process. Run the Marco for downloading the file and refresh the content of your worksheet from Data Connection. You can have an additional macro that refreshes the content of the worksheet. It refreshes all pivot tables and the file connection for reading the file.
Hint: Use excel Table for keeping the information updated automatically when additional information is loaded into the worksheet. If you use pivot tables for presenting the data, use as data source an excel table instead of excel range.
It minimizes a lot the manual effort.
Here you can find a solution that uses REST API, the author provides the source code, but it is more complicated. If you need something simple, my solution may work for you.

Resources