안녕하세요,
일부 출력을 생성하고 사용자 선택에 따라 파워 포인트를 저장하는 스크립트를 작성하려고합니다. H 목록 상자 구조 안에 중첩 된 경우 "프레젠테이션 저장"명령을 사용할 수 없습니다.
첫 번째 스크립트는 잘 작동합니다.
Names Default To Here( 1 );
dt1 = open(Pick File("Select the the DATA TABLE to open.")); //open a file
WinHandle2 = new Window("Graphs",Distribution(Column(2))); //generate some output of interest
product_name = dt1:Product[1]; //get the product name from the first cell in the data table
//OUTPUT report to a Powerpoint file (THIS WORKS FINE):
saveFilename=product_name ||"_Distribution_"||char(year(today())) ||"-"||char(month(today()))||".pptx";
WinHandle2 << Save Presentation(saveFilename, Outline Titles("TopLeft")); //save the output to a Powerpoint file.
//prompt user to see if they want to save and close remaining windows.
w1 = New Window("What's Next?", text box("
Save the report and Close the Data Table?
"),
// Get user input,
H List Box(Button Box("Yes",
WinHandle2<<CLOSE window=""></CLOSE>H 목록 상자에서 "프레젠테이션 저장"명령을 움직이면 "오류 프레젠테이션 파일 작성 중"오류가 발생합니다. ReadWrite 모드에서 열 수 없습니다. 시스템이 지정된 파일을 찾을 수 없습니다". 아래의 작동하지 않는 코드를 참조하십시오.
Names Default To Here( 1 );
dt1 = open(Pick File("Select the the DATA TABLE to open.")); //open a file
WinHandle2 = new Window("Graphs",Distribution(Column(2))); //generate some output of interest
product_name = dt1:Product[1]; //get the product name from the first cell in the data table
//prompt user to see if they want to save and close remaining windows.
w1 = New Window("What's Next?", text box("
Save the report and Close the Data Table?
"),
// Get user input,
H List Box(Button Box("Yes",
//OUTPUT report to a Powerpoint file (THIS WORKS FINE):
saveFilename=product_name ||"_Distribution_"||char(year(today())) ||"-"||char(month(today()))||".pptx";
WinHandle2 << Save Presentation(saveFilename, Outline Titles("TopLeft")); //save the output to a Powerpoint file.
WinHandle2<<CLOSE window=""></CLOSE>기본적으로 프레젠테이션을 저장할지 또는 종료할지 여부를 사용자가 선택하도록합니다. 도와 주셔서 미리 감사드립니다.
다음과 같은 한 가지 방법이 있습니다.
Names Default To Here( 1 );
dt1 = Open( path = Pick File( "Select the the DATA TABLE to open." ) );
pathToFolder = Left( path, Contains( path, Word( -1, path, "\/" ) ) - 1 );
답장을 보내 주셔서 감사합니다. 첫 번째 코드 세트 (프레젠테이션이 H 목록 상자 외부에 있음)가 잘 실행되는 것은 이상한 일입니다.
상위 코드에서 파일은 마지막 활성 디렉토리에 저장됩니다. (스크립트가 실행되고 입력 데이터 파일이있는 위치). H 목록 상자 버전의 코드로 어떻게 할 수 있습니까?
문제는 프레젠테이션 저장에 전달할 경로 / 파일 이름이 존재하지 않는 폴더를 가리키고 있거나 쓰기 권한이없는 폴더를 가리키고 있다는 것입니다. 코드를 실행할 때 동일한 메시지가 수신 된 다음 product_name 값에 쓰기 가능한 디렉토리로의 경로를 추가 한 다음 코드가 제대로 작동했습니다.