如何將列資料匯出為字串或txt我有以下資料表,如何使用 JSL 匯出該列:
1. 字串 = 561193、542003、527679...
2. 將資料匯出到.txt,其中值顯示:561193、542003、527679...
s
資料存取回覆:如何將列資料匯出到字串或txt這是一種方法
Names Default To Here( 1 );
// Create an example data table
dt = New Table( "Example",
add rows( 100 ),
New Column( "Number", character, set each value( Char( Random Integer( 1000, 9999 ) ) ) )
);
// Convert character column to a literal string value
string = Concat Items( dt:number[Index( 1, N Rows( dt ) )], "," );
// Write the string variable to a .txt file
Save Text File( "$TEMP/savedfile.txt", string );