Export data from a Slack Channel to Excel - slack-api

Is there any solution to create a script that will do the following job:
Access a Slack Channel
Read all the comments from the last 7 days. Each comment has the following structure:
one title
a description of what will be done
date and hour of when it will be done
Export that data in an Excel table with a column for each line from the structure.
Thank you!

Related

Automating Aggregating Data in Google Sheets

I have 100+ rows that are updated daily and as of now I have to update my last column manually. In my last column "Key Results Aggerated" I have to manually copy and paste Key Results into single cells per employee. I spent hours trying to figure out a solution but I am unable to. I have tried using import range function and concatenate function but I am having a hard time automating it since users can always add/remove a new row for "Key Result" at any time of the day. Thanks in advance. 🙏
Pic: Raw Data
Pic: Results I am trying to achieve.
Google Spreadsheet Example
You may insert this in E1 and protect that row:
={"KEYS";MAP(A2:A,D2:D,LAMBDA(aval,dval,IF(aval="","", TEXTJOIN(CHAR(10),1,dval:INDEX(D:D,ROW(dval)+IFNA(XMATCH("*",INDEX(A:A,ROW(aval)+1):INDEX(A:A, ROWS(D:D))),ROWS(A:A))-1)))))}
Erase previously all the prior formulas in E. Let me know

Google Sheet gviz csv export - two column labels not exporting

I'm trying to export this Sheet to a csv for use in a webmap using this link:
https://docs.google.com/spreadsheets/d/1XQnp7RK-Ddq4wCjpHjmcnVEKood1U08kIfRGr8sDRoU/gviz/tq?tqx=out:csv&sheet=Sheet1
It works well, except that two of the column headers (lat, long) are not exporting and the column labels in the csv are blank. I tried to change the format of the cell from Automatic to Plain text, but that didn't fix it.
Findings
It seems this is an issue with gviz api as there's an ongoing Google Issue tracker report about it. You may want to click the star icon on the top left of issue report page to indicate that your are also affected by this issue.
UPDATE
As an alternative solution, you may try this way as this will export the same csv file:
https://docs.google.com/spreadsheets/d/1XQnp7RK-Ddq4wCjpHjmcnVEKood1U08kIfRGr8sDRoU/export?format=csv&gid=0
Reference:
Download link for Google Spreadsheets CSV export
Test
I did some quick tests on my end & after manually downloading the sheet file as a Comma Separated Values (CSV) file from the Google Sheet UI & after using the alternative solution, there's no issue with missing cells. But when using the gviz api link, the issue occurs:
If you set the column to 'Plain text' under the Format menu > Number, you should receive the data upon export.

Pulling data from CRM System with Inputrange - mismatched lines

I have built a CRM System on Google Sheets and I am currently facing an issue with the mastersheet. The mastersheet is pulling data from other spreadsheets within the same document. The issue I am facing is that I would like the data to go on to the next available line at the bottom of the mastersheet page, instead of being put underneath the last entry from that particular sheet.
You can find the code I have used below:
={FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Customer Data'!B:B"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Customer Data'!B:B")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'17 June 2017 M&G Bookings'!B2:B"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'17 June 2017 M&G Bookings'!B2:B")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Talent Agency - General Details Request form'!Q2:Q"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Talent Agency - General Details Request form'!Q2:Q")));FILTER(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Performer Database'!P2:P"),LEN(IMPORTRANGE("1c47hRszG3jZf7SPj5pxtabmsw3tmR11ETx3hcEKue2w","'Performer Database'!P2:P")))}
Can anyone please help me with this?
Timestamp goes to column A
QUERY and it's ORDER BY clause could be helpful but you should add the timestamp column to your formula in order to use it to sort.

How can I share particular row of my spreadsheet in Google docs?

I have made attendance sheet of my students in Google docs . Now I want to share their weekly attendance sheet with them but I want to share only particular row of individual student to them. So that they are not able to see attendance of class mates.
Is this possible.?
I can hide the rows but doing this for 120 students everytime is time taking.
?
Please help.
My suggestion would be to find a Google Sheets plugin that lets you generate emails. If you include the email address of the student in the row with their data, you can use commercially available plugins to use the content of the row as the body of the email and the email address of the student as the 'send to' address.
A search for 'email' in the 'get add-ons' part of sheets should help you along with this. I have done similar things before and it works quite well. Good luck!
I used the following ATTACHED CODE.
But I can only send one row using this : Name AttendanceinSub1. I want to send multiplr rows like: Name AttendanceinSub1 AttendanceinSub2 AttendanceinSub3. Can you suggest something?

Getting block data from YQL

I read up on YQL. However i'm at a loss on how to get blocks of data.
I can get individual stock data fine but how do you get collated data like the FTSE 100 shares, without having to find the symbol for each 100 shares and pulling that data in individually?
Ideally i would have the hundred shares with each of their bits of data.
Thanks in advance,
Ewan
looks like you are right that only one stock can be queried at a time. since the api is restful, you can easily use a for loop in bash and curl all the stocks.
Whenever we query YQL table we need to give the SYMBOLS (tickers) as inputs. However there is a limit to the number of symbols you can enter in one go.
I created an Excel sheet where I read a list of symbols from a sheet and then query with YQL and dump the data in another sheet.
Let's assume you want to pull out historical prices with the following specifications:
Symbol/Ticker : symbol
StartDate
EndDate
The corresponding weblink to extract this info would be (in VBA syntax)
"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20yahoo.finance.historicaldata%20where%20symbol%20in%20%28%27 " & symbol & "%27%29%20and%20startDate%20=%20%27" & startDate & "%27%20and%20endDate%20=%20%27" & endDate & "%27&diagnostics=true&env=store://datatables.org/alltableswithkeys"
You can find the Excel sheet present at my blog.

Resources