저는 워크플로를 사용하여 엑셀 파일을 가져왔고 스크립트를 더 일반적으로 편집하고 있습니다. 가져오기 설정에서 열 이름 아래에 시작은 특정 숫자이지만 대신 특정 조건이 충족될 때(예: 행 5 열 2에 시작이 있고 시작이 열 이름인 경우) 시작이 되기를 원합니다.
올바른 방향으로 도움을 주시면 감사하겠습니다.
아래는 코드 조각이며 중요한 기능은 굵은 글씨로 표시되어 있습니다.
Import Settings(
End Of Line( CRLF, CR, LF ),
End Of Field( Comma, CSV( 0 ) ),
Strip Quotes( 1 ),
Use Apostrophe as Quotation Mark( 0 ),
Use Regional Settings( 0 ),
Scan Whole File( 1 ),
Treat empty columns as numeric( 0 ),
CompressNumericColumns( 0 ),
CompressCharacterColumns( 0 ),
CompressAllowListCheck( 0 ),
Labels( 1 ),
Column Names Start( 263 ),
First Named Column( 1 ),
Data Starts( 264 ),
Lines To Read( "All" ),
Year Rule( "20xx" )
)
다음은 사용 가능한 방법론에 대한 한 발 앞서 나갈 수 있는 몇 가지 의사 코드입니다.
dt = Open(<EXCEL file="">);
// Get the first row where the second column has the word START
headerRow = dt << get rows where( contains( as column(2), "START" )[1];
dataRow = headerRow + 1;
// Close the data table
close(dt, nosave);
// Substitute into the full Excel Import Settings the the header row number and
// the data row number and run the code
Eval(
Substitute(
Expr(
dt = Open(.........
Column Names Start( _H_ ),
First Named Column( 1 ),
Data Starts( _S_ ),
......................);
),
expr( _H_ ), headerRow,
expr( _S_ ), dataRow
)
);</EXCEL>
데이터에 따라 다르겠지만 전체 파일을 가져온 후 JMP에서 데이터 정리를 수행하는 것이 더 쉬울 수도 있습니다.