Status Update
Comments
ba...@gmail.com <ba...@gmail.com> #2
Specially being able to talk to our XMPP bots via GTalk like:
var ws = new WebSocket("ws://talk.google.com ")
Possibilities are endless for instant communication, social games, real-time
monitoring, etc.
var ws = new WebSocket("ws://
Possibilities are endless for instant communication, social games, real-time
monitoring, etc.
Description
not already been reported.
Please provide a short description of the issue:
I want to have a spreadsheet switch to a specific, existing sheet when the sheet is opened. The necessary script is contained in a separate function 'activateCurrentMonth'. Calling this function from within the onOpen event has no effect. Calling the same function from a menu entry does activate the desired sheet.
Please provide a small sample script that reliably reproduces the issue.
The sample should run as-is or with minimal setup, without external
dependencies.
function onOpen() {
SpreadsheetApp.getUi().createMenu('Bijwerken')
.addItem('Activate Current Month', 'activateCurrentMonth')
.addToUi();
activateCurrentMonth();
}
function activateCurrentMonth() {
var thismonthsheet;
var shname = "2014-07"
var sheet = SpreadsheetApp.getActiveSpreadsheet();
thismonthsheet = sheet.getSheetByName(shname);
if (thismonthsheet != null) {
sheet.setActiveSheet(thismonthsheet);
}
else {
Browser.msgBox("Sheet '"+shname+"' not found!");
}
}
What steps will reproduce the problem?
1. create a spreadsheet with at least two sheets present in spreadsheet, one of which is named "2014-07"
2. make sure the spreadsheet has been previously closed with the "2014-087" sheet inactive - otherwise, you will get a false positive result.
3. add the functions above
4. open the spreadsheet. The "2014-07" sheet will not activate.
5. select the 'Activate Current Month' function form the menu. The "2014-07" sheet will activate now.
What is the expected output? What do you see instead?
Expected: the "2014-07" will be the active sheet
See instead: the "2014-07" sheet does not activate
What is the project key (found under "File > Project properties")? The
project key does not give the Apps Script team access to your source
code or data. We use it to look up debug information about your script.
MDbSS8vN6X1ISGow5nyFZx79qhhlEOC_Q
Please provide any additional information below.
-
To subsequent readers: If you are also experiencing this issue, please
click the star next to the issue number. We prioritize issues with the
most stars.