When I am trying to read data from BufferedReader and writing into excel using FileOutputStream object with POI APIs then i am getting the data in excel file in bad formats. you can check the log file and excel file attached for more information.
Here my problem is I cannot use BufferedWriter in place of FileOutputStream because POI class XSSFWorkbook only have one write method and we can only pass FileOutputStream class objet there.
Please have a look the code and suggest me how i can proceed further.
Do you have any idea why getEncoding() method giving me UTF8 instead of UTF-8?
I don't. The java.nio.charset.Charset javadocs make it clear which charsets need to be supported. I did a quick grep through the Java source code, and it looks like some parts of it may accept "UTF8" instead of "UTF-8" (the XML parser, for example, although that may be required by the XML spec), but not all of it. And in particular, probably not the java.io package.