此問題是VB ReDim of member field programmatically的後續操作。在數組的尺寸適當後,我嘗試設置元素的值,但是當我嘗試分配第一個值(MySB.AssignValues(0,「B」,0,7.6))時,我在運行時得到一個異常 System.InvalidCastException was unhandled
HResult=-2147467262
Message
我有以下代碼: var ee = SpreadsheetApp.getActiveSheet().getName();
if (ee == "Stuff") {
SpreadsheetApp.getActiveSheet().getRange('B2').setValue(emailAddress);
}
else {
SpreadsheetApp.getActiveSp