Add pivot-table to a google spreadsheet, via the API - google-api

I'd like to automatically create one of these pivot tables:
https://drive.googleblog.com/2011/05/summarize-your-data-with-pivot-tables.html
Given some data and parameters, the script would create a new google spreadsheet, complete with pivot-table and chart, non-interactively.
Is this possible?

It appears that there is a partial answer. I haven't tried it yet, and I wouldn't swear by it till I do. If anyone does try this technique, post here.

Related

How to Iterate SAP Table and click Each Row Using Excel with UIPATH?

I have sap table i want to iterate each row and click the row using Excel in UiPath.
How can i do that can anyone explain briefly.
the tables are differant but it looks same scenario.
Consider this free resource as your starting point for learning how to automate SAP: UiPath Academy
After you will finish the foundation course you may try SAP-specific course to learn how do solve your issue.
ok i think i can give you a good starter answer
note, i usually just convert all the data to datatable and work with that since i am more familiar, but you can use the excel activities and click features
1st. set the activity "excel application scope" that was my hangup forever, and seems to be that first thing that sticks everyone. it focuses all the other excel activities afterwards.
after this use a for each loop the following will show you how to do that easily
https://forum.uipath.com/t/loop-something-x-number-of-times/24667
then you can use read/write row/cell/column etc and use the 'i' integer counter to go through each row.
an alternative to the above is to set the excel scope, then read the entire sheet to a datatable, which i find easier if you are just doing database manipulation
also I also would like to double down on llya Kochetov's suggestions of the academy and also the UIPath forum which is incredibly helpful

Is there an API for extracting grades in Google Classroom

I was reviewing the Google Classroom API and noticed there was not an option for getting grades. I need to extract the assignment grades from Google Classroom into an external grade book app that I am creating. Does anyone know if this is possible, or how to do this?
You can definitely get grades from the API.
Classroom.Courses.CourseWork.StudentSubmissions.list(course.id, work.id).studentSubmissions
From there, loop through the studentSubmissions:
studentSubmissions[i].assignedGrade
That gets the assigned grade for that specific assignment. I also grab studentSubmissions.userId in order to get the student name. Let me know if you need anything else.
It is possible with Google Sheets and Apps Script. You can export your grades to Google Sheets and from there, you can use Apps Script to extract data from the sheets. To do that, you can check this SO question and the methods to access and modify spreadsheet sheets.

Parse js sdk, How do you query many to many in document DB?

In the Parse js guide it says:
For example, a User may have many Posts that she might like. In this case, you can store the set of Posts that a User likes using relation. In order to add a Post to the “likes” list of the User, you can do:
var user = Parse.User.current();
var relation = user.relation("likes");
relation.add(post);
user.save();
My use case is actually this exact setup. We have Users and they can "like" 0-many Posts, so I set it up exactly as stated above. My issue now is that for a given Post or set of Posts, I need to query how many users have liked each Post. I'm having trouble figuring out how to query for that... Can someone help me out? I'm not sure if this is a limitation or if I just don't know enough to figure this out. I've thought about storing a counter on the Post itself and using increment() and decrement() each time a User likes or unlikes a Post, but I'd rather not if I can get away with it.
There are a couple of ways you can do this. One would be to also have a relation on each post for likedBy so when a user likes a post, you add that user to the post's likedBy relation as well as adding the post the user's likes relation.
Another solution is to create a new Parse class for Like. Whenever a User likes a post, you create a new Like with a pointer to the Post and the User who liked it. Then if you want to find the posts that a user likes, you can easily query that, or if you want to know which users like a post, that query is just as simple.
I personally use the second approach, but either will work

Generate dynamic form and store the data in Laravel

For a part of my next project I'm looking for the following information.
I'm trying to make an application for something like scouts, all the supervisors will have a user account on the application and the supervisors will be able to manage the members of the scouts. I'm looking for a way to let the supervisor decide what information they would like to store about the member. This will then be converted to a form so they can easily add new members.
What is the best way to make a dynamic form and store the data in a database.
Thanks in advance!
Well there are many ways to do that, so I don't know if this is the best with the little information you give us about your "case scenario".
I'll do create this tables:
forms (hold the form basic info and supervisors reference)
forms_fields (with an Elquent relatinship tipy "belongsTo")
Check Laravel documentation on Eloquent here>

Looking for links for zend framework ajax table refresh

As you maybe aware from the following post I'm new to the Zend framework and web programming so any help is greatly appreciated.
What I want to do is have a page that my users can search for clients stored on the database have the results returned via a table. I know how to do this in a traditional form -> post -> results page manner but I would like to implement the following:
Have two or more Dojo autocomplete combo boxes that the user can enter search criteria into (I've found examples of this on the web and should be ok implementing this.)
Use the text entered into the query the clients table in the DB.
Return the results in a table on the same page without having to redirect, and if possible have the table update the results as the user types into the combo boxes.
for example if the user types "Fa" for example the table will have
"Farrell
"Fagan"
"Farrelly"
As the user continues to type eg "Far" the table will have
"Farrell"
"Farrelly"
As you may have already guessed I need help with parts two and three. I've tried searching using keywords refresh and autocomplete but I've been unable to find anything that comes close to what I need.
Can anyone please provide links to tutorials/examples of how to do this in the Zend Framework. I know code is a lot to ask for but if anyone is feeling generous go ahead.
Just in case it makes a difference I'm using Doctrine ORM to handle my models.
Thanks in advance for any replies.
Graham
The basic gist is this...
Using the AjaxContext helper, add an html context to your action.
Move your table markup into a .ajax.phtml file and replace it in your normal view with a render call
Example
<?php echo $this->render('controller-name/action-name.ajax.phtml') ?>
Add your JavaScript event handlers to the page. When requesting the AJAX content, add a format=html parameter to the request. This will trigger the AjaxContext helper, returning only your table markup which you can then inject into the page.
The best part about this approach is that it degrades gracefully. If JavaScript is disabled or not available, the page reverts to the old school form -> post -> results method.
Have a look at my AJAX pagination post here for some pointers - http://blog.philipbrown.id.au/2011/03/awesome-pagination-with-zf-paginator-ajaxcontext-and-the-html5-history-api/
This uses a page parameter in the same way you want to use your search criteria so it should do as a base reference.

Resources