안녕하세요,
사용자가 잘못된 Excel 파일을 선택했기 때문에 사용자에게 오류를 반환하는 JMP 프로그램을 만들고 싶습니다.
내 프로그램의 예는 다음과 같습니다.
The file_path contains the path to the file selected by the user.
However, I would like to return a message error when the Worksheets( "AAA" ) is not contained in the Excel file selected by the user: because he didn't choose the right Excel file.
Funct = Function( {file_path, visib},
Eval(
Eval Expr(
myTable = Open(
file_path,
Worksheets( "AAA" ),
Use for all sheets( 1 ),
Concatenate Worksheets( 0 ),
..
),
Expr( visib )
)
)
);if 조건을 만들 수 있나요? 선택한 파일에 문제의 워크시트가 없으면 JMP는 error? 메시지를 반환합니다.
그러나 나는 그것을 만드는 방법을 모른다.
누구든지 해결책이 있습니까?
대답 해 주셔서 감사합니다,
세바스찬
Get Excel Worksheets()라는 기능이 있습니다. 예를 들어 Throw()와 결합하거나 자신만의 모달 창을 만들 수 있습니다.
Names Default To Here(1);
sheetList = Get Excel Worksheets(
"$SAMPLE_IMPORT_DATA\Team Results.xlsx"
);
If(!Contains(sheetList, "AAA"),
Throw("No 'AAA' found from excel sheet list");
);