private void createExcelDoc ( ) throws PrompterException { ExcelDocConfiguration configuration = new ExcelDocConfiguration ( ) ; String company = prompter . prompt ( "Enter company:" , configuration . getCompany ( ) ) ; String author = prompter . prompt ( "Enter author:" , configuration . getAuthor ( ) ) ; String pageTitle = prompter . prompt ( "Enter page title:" , configuration . getPageTitle ( ) ) ; String outputFile = prompter . prompt ( "Enter output file name:" , configuration . getOutputFile ( ) ) ; String headers = prompter . prompt ( "Enter custom headers:" , configuration . getHeaders ( ) ) ; String confirm = prompter . prompt ( "Confirm Excel documentation: outputFile='target/" + outputFile + ( outputFile . endsWith ( ".xls" ) ? "" : ".xls" ) + "'\n" , Arrays . asList ( "y" , "n" ) , "y" ) ; if ( confirm . equalsIgnoreCase ( "n" ) ) { return ; } ExcelTestDocsGenerator generator = getExcelTestDocsGenerator ( ) ; generator . withOutputFile ( outputFile + ( outputFile . endsWith ( ".xls" ) ? "" : ".xls" ) ) . withPageTitle ( pageTitle ) . withAuthor ( author ) . withCompany ( company ) . useSrcDirectory ( getTestSrcDirectory ( ) ) . withCustomHeaders ( headers ) ; generator . generateDoc ( ) ; getLog ( ) . info ( "Successfully created Excel documentation: outputFile='target/" + outputFile + ( outputFile . endsWith ( ".xls" ) ? "" : ".xls" ) + "'" ) ; }
Create Excel documentation in interactive mode .