열 데이터를 문자열이나 텍스트로 내보내는 방법다음과 같은 데이터 테이블이 있는데 JSL을 사용하여 열을 내보내려면 어떻게 해야 하나요?
1. 문자열 = 561193, 542003, 527679...
2. 값을 표시하는 .txt 파일로 데이터를 내보냅니다: 561193, 542003, 527679...
s
데이터 접근Re: 열 데이터를 문자열 또는 txt로 내보내는 방법@txnelson 정말 감사합니다!
Re: 열 데이터를 문자열 또는 txt로 내보내는 방법Names Default To Here( 1 );
dt = Current Data Table( );
// Stop the script if no open data tables
If( Is Empty( dt ), Stop());
// Make list of column names
colNames = dt << get column names();
// Select the column
nw = New Window("Column names", <<MODAL></MODAL>Re: 열 데이터를 문자열이나 txt로 내보내는 방법@txnelson , 답변 감사합니다. 정말 효과가 있네요.
저는 JSL 초보자입니다. 여기서 여러분의 도움을 구해야 합니다. 다음 JSL에서 "dt:number"를 대체하기 위해 선택한 열을 어떻게 사용할 수 있습니까?
Names Default To Here( 1 );
dt = Current Data Table( );
// Stop the script if no open data tables
If( Is Empty( dt ), Stop());
// Make list of column names
colNames = dt << get column names();
// Select the column
nw = New Window("Column names", <<MODAL></MODAL>
Re: 열 데이터를 문자열 또는 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 );