How to fill in Excel file using java

前端 未结 8 2197
离开以前
离开以前 2021-01-05 05:08

I have the following code to fill in the Excel file, with information that I get from the Internet using Jsoup.

package knvbj;

import java.io.FileInputStrea         


        
8条回答
  •  天命终不由人
    2021-01-05 05:46

    I was getting a similar error when the file used to create the output stream already had data. If you are looking to append data to the file, you must indicate so in the file output stream object:

    FileOutputStream out = new FileOutputStream("/Users/muratcanpinar/Downloads/KNVBJ/build/classes/knvbj/ClubInformation.xlsx", true);
    

    When you do this, wb.write(out) should work as expected.

提交回复
热议问题