我的轉位有奇怪的症狀

當轉置執行並且列中的第一個單元格為“批次 0”且所有後續單元格為空時,我想將這些單元格填充為“批次 1”。有什麼線索我可以怎麼做嗎?
這是一個小腳本,可以完成您想要的操作

If( :"RSC TCANEAL/ furnace/ 5139"n[1] == "Batch 0",
Try(
:"RSC TCANEAL/ furnace/ 5139"n[Current Data Table() << get rows where(
Is Missing( :"RSC TCANEAL/ furnace/ 5139"n )
)] = "Batch 1"
)
);
這是一個完整的例子
Names Default To Here( 1 );
New Table( "Example",
Add Rows( 25 ),
New Column( "RSC TCANEAL/ furnace/ 5139",
Character,
Set Values(
{"Batch 0", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
"", ""}
)
)
);
If( :"RSC TCANEAL/ furnace/ 5139"n[1] == "Batch 0",
Try(
:"RSC TCANEAL/ furnace/ 5139"n[Current Data Table() << get rows where(
Is Missing( :"RSC TCANEAL/ furnace/ 5139"n )
)] = "Batch 1"
)
);吉姆,謝謝。我修改了它以迭代從 4 開始的列,並且僅對除第一行之外的空列進行操作。
colList1 = Data Table( "Transpose of History" ) << get column names( string );<BR /><BR />For( i = 1, i <= N Cols( Data Table( "Transpose of History" ) ), i++,
If( Column(colList1[i])[1] == "Batch 0" & Col N Missing( As Column(colList1[i]) ) == NRow()-1,
Try(
Column(colList1[i])[Current Data Table() << get rows where(
Is Missing( As Column(colList1[i]) )
)] = "Batch 1"
)
)
);