
function main(workbook: ExcelScript.Workbook) {
let currentDate = new Date();
// Get year, month, and day
let year = currentDate.getFullYear();
let month = (currentDate.getMonth() + 1).toString().padStart(2, '0'); // Months are zero-based
let day = currentDate.getDate().toString().padStart(2, '0');
// Format date as yyyy-MM-dd
let formattedDate = `${year}-${month}-${day}`;
let table1 = workbook.getTable("Table1");
// Apply checked items filter on table table1 column Date
table1.getColumnByName("Date").getFilter().applyValuesFilter([{ date: formattedDate, specificity: ExcelScript.FilterDatetimeSpecificity.month }]);
}