My Add-In sometimes crashes and takes up huge amounts of memory and is just generally bad performance while I iterate over a range and add hyperlinks.
My hyperlinks almost always follow the formula of URL + CellValue
and I wonder if I can add this somehow to an entire range without looping to increase performance?
Here is an example of what I do, note, Excel doesn't seem to "respect" the screen updating, or maybe its just slow after sync, but I can watch it change cells row by row visually its so slow..
const Hyperlink_Settings_Obj = {
address: null,
documentReference: null,
screenTip: null,
textToDisplay: null,
}
context.workbook.application.suspendScreenUpdatingUntilNextSync();
var key_index = 0
for (var ri = 0; ri < Used_Rng_And_Props.rowCount; ++ri) {
var val = Used_Rng_And_Props.values[ri][key_index]
var cell = Used_Rng_And_Props.getCell(ri, key_index)
var hlink_obj = JSON.parse(JSON.stringify(Hyperlink_Settings_Obj))
hlink_obj.address = URL + val
hlink_obj.textToDisplay = val
cell.hyperlink = hlink_obj
}