0
votes

I have the following googleSheet URL:

https://docs.google.com/spreadsheets/d/19D-ApX1M_vuGUVOSIUrxrpyVna6pxBk86abTfmXRzBI/edit#gid=0?empId=1203&DepId=MCA

I want to pass query String parameter in google sheet url and use it in to sheet script

I use this code in sheet script

var url = SpreadsheetApp.getActiveSpreadsheet().getUrl();

above url give me only

https://docs.google.com/spreadsheets/d/19D-ApX1M_vuGUVOSIUrxrpyVna6pxBk86abTfmXRzBI/edit

I want to use all parameters in url like

https://docs.google.com/spreadsheets/d/19D-ApX1M_vuGUVOSIUrxrpyVna6pxBk86abTfmXRzBI/edit#gid=0?empId=1203&DepId=MCA

how it is possible to get parameters empId and DepId from googleSheet in Script

1
some one help me, I am stuck ! - user2753644
we don't have access to your URLs as it's private. we have no idea what project your working on and how you came up with that URL. - noogui

1 Answers

1
votes

This is not possible by using the Google Apps Script's Spreadsheet Service. It could be possible by using the creating a web app and using event object. For further details see Web Apps.