Skip to content

Commit 62d9fd8

Browse files
Add refresh button to SpreadsheetApp UI
1 parent 086d92e commit 62d9fd8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/sheets/main.gs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ const todayDay = new Date().getDate();
1313
const sheet = ss.getSheets()[new Date().getMonth() + 1]; // getMonth() returns 0-11 months, not 1-12
1414

1515
/* Functions */
16+
function onOpen(e)
17+
{
18+
SpreadsheetApp.getUi().createMenu("Atualizar")
19+
.addItem("Atualizar agora", "main")
20+
.addToUi();
21+
}
22+
1623
function findEvent_returnDate()
1724
{
1825
let data = sheet.getDataRange().getValues(); // macro to retrieve (int row, int col) cell data
@@ -50,4 +57,4 @@ function main()
5057
highlightToday_sEntry();
5158
clearOutdatedEvents();
5259
findEvent_returnDate();
53-
}
60+
}

0 commit comments

Comments
 (0)