Skip to content
Discussion options

You must be logged in to vote

Please refer to this and see if it is helpful to you.

@Test
public void writeTest() {
  
    List<List<String>> headers = new ArrayList<>();
    headers.add(Arrays.asList("标题", "姓名"));
    headers.add(Arrays.asList("标题", "年龄"));
    headers.add(Arrays.asList("标题", "学历"));
    headers.add(Arrays.asList("标题", "爱好"));
    headers.add(Arrays.asList("标题", "存款"));
    
    
    FastExcel.write(new File("test.xlsx"))
            .head(headers)  // configure the head
            .sheet()
            .doWrite(Collections.emptyList());
}

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@delei
Comment options

delei Aug 5, 2025
Collaborator

Answer selected by delei
@swl-123
Comment options

@delei
Comment options

delei Aug 5, 2025
Collaborator

Comment options

You must be logged in to vote
2 replies
@delei
Comment options

delei Aug 12, 2025
Collaborator

@nyc1215
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants