使用刪除屬性(公式)腳本刪除列公式時出錯。你好,
我有多個帶有公式的列,我想在計算後刪除公式。
代碼如下。
cols = dt << get column names();
For( i = 1, i <= N Col( dt ), i++,
cols[i] << Delete Property( formula )
);
然後,日誌顯示以下內容:
Send Expects Scriptable Object in access or evaluation of 'Send', cols[i] << /*###*/Delete Property( 公式 ) /*###*/
有人可以幫我這個嗎?
另一個問題是我們是否可以列出特定列並刪除公式。
我們有一個名為“刪除公式”的腳本,我想用它來列列表,但似乎效果不佳。
分析數據表腳本回复:使用刪除屬性(公式)腳本刪除列公式錯誤。cols = dt << get column names();
For( i = 1, i <= N Col( dt ), i++,
column(cols[i]) << Delete formula;
);
//or
For( i = 1, i <= N Col( dt ), i++,
column(i) << Delete formula;
);
回复:使用刪除屬性(公式)腳本刪除列公式錯誤。cols = dt << get column names();
For( i = 1, i <= N Col( dt ), i++,
As Columns( cols[i] ) << Delete Property( formula )
);
Put As Column() 解決了這個問題。 然而,我仍然想知道為什麼它確實工作了幾次,後來卻沒有工作——使用相同的 JMP 版本(我同時使用 15 和 16EA)。