Reecenorman1996
New Member
- Joined
- Jul 20, 2023
- Messages
- 31
- Office Version
- 365
- Platform
- Windows
function main(workbook: ExcelScript.Workbook) {
let table1 = workbook.getTable("Table1");
// Replace all "" with "0" on table table1
table1.getRange().replaceAll("", "0", {completeMatch: true, matchCase: true});
let selectedSheet = workbook.getActiveWorksheet();
// Set format for range G:G on selectedSheet
selectedSheet.getRange("G:G").setNumberFormatLocal("[$-x-systime]h:mm:ss AM/PM");
}
the above works if i am not trying to find blanks , i need to use this code in power automate as run a script so cant use the above as a vba
let table1 = workbook.getTable("Table1");
// Replace all "" with "0" on table table1
table1.getRange().replaceAll("", "0", {completeMatch: true, matchCase: true});
let selectedSheet = workbook.getActiveWorksheet();
// Set format for range G:G on selectedSheet
selectedSheet.getRange("G:G").setNumberFormatLocal("[$-x-systime]h:mm:ss AM/PM");
}
the above works if i am not trying to find blanks , i need to use this code in power automate as run a script so cant use the above as a vba