Question

2
Replies
66
Views
Close popover
Rajasekhar Pentakota (RajasekharP5136)
Virtusa
Architect
Virtusa
GB
RajasekharP5136 Member since 2016 5 posts
Virtusa
Posted: March 25, 2020
Last activity: March 25, 2020
Closed

Excel file generated using Apache POI classes is not opening

Generated excel file from java step from pega using below code,

        try (         XSSFWorkbook workbook = new XSSFWorkbook()) {               FileOutputStream out = new FileOutputStream(new File("createworkbook.xlsx"));               workbook.write(out);               out.flush();               out.close();

 

Ofcourse, I have fixed all errors at compile time with above code to add full class names. The problem is , File is getting generated however, the generated excel file while opening throwing error as "Excel cannot open the file <Filename> because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."           

Pega Marketing 7.31 Low-Code App Development Other Industry Solutions Consultant
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.