How do I create a roster for classes based on the teacher name or class from a list of all students

153 views
Skip to first unread message

Geoff Scott

unread,
Feb 3, 2023, 5:25:19 PM2/3/23
to Google Apps Script Community
I have a google sheet with all students and teachers. Is there a way to have an apps script to create a doc for each teacher that lists all of the students that have that teacher. Basically take the spreadsheet data and make rosters for all of the teachers. Right now I filter for each teacher and print. Then filter another teacher and print. I would like to just make one multi page doc with each teacher and their students.  

Scott Bennett

unread,
Feb 3, 2023, 5:49:04 PM2/3/23
to google-apps-sc...@googlegroups.com
You could create multiple tabs and filter the data using the filter function in Google sheets. Then when you print hide the sheets, you don’t want to print and print the entire workbook. You can use Google apps script to add the tabs.

Scott Bennett


Sent from my iPhone 

On Feb 3, 2023, at 4:25 PM, Geoff Scott <gsc...@andrews.esc18.net> wrote:

I have a google sheet with all students and teachers. Is there a way to have an apps script to create a doc for each teacher that lists all of the students that have that teacher. Basically take the spreadsheet data and make rosters for all of the teachers. Right now I filter for each teacher and print. Then filter another teacher and print. I would like to just make one multi page doc with each teacher and their students.  

--
You received this message because you are subscribed to the Google Groups "Google Apps Script Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/3a20c77b-67c7-474d-bc2b-b3bc4a297b9dn%40googlegroups.com.

Robert B Johnson

unread,
Feb 4, 2023, 4:54:58 AM2/4/23
to Google Apps Script Community
I would look into the "=query" function this function acts like  SQL statements for databases. I would have my master list, then create a tab per teacher using the "=query" function.

Do you have a sheet with all the data on it you would share ??

Warm regards
Bob J

Geoff Scott

unread,
Feb 5, 2023, 4:56:10 PM2/5/23
to Google Apps Script Community
Thank you, 
I have a lot of tabs on the sheet already and was trying to avoid more tabs and another entire spreadsheet. but I will look into that. 

Geoff Scott

unread,
Feb 5, 2023, 4:58:25 PM2/5/23
to Google Apps Script Community
I do have a sheet, but need to modify it for the security of students first. 

Robert B Johnson

unread,
Feb 5, 2023, 5:24:00 PM2/5/23
to google-apps-sc...@googlegroups.com
great just send a snippet ,,  And I will try and show you what I would do


Later
Bob J

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Script Community" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-script-community/FJUt2Pjxo2s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-script-c...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-script-community/1c90e97d-e77f-495b-9a1a-b4030c00e2e2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages