Skip to content

hs-web/reactor-excel

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
Mar 17, 2020
Mar 17, 2020
Mar 17, 2020
Dec 17, 2021
Mar 17, 2020
Mar 17, 2020
Jun 20, 2022

基于Reactor的excel,csv导入导出

Build Status codecov

ReactorExcel
        .writeFor("csv")
        .justWrite()
        .sheet(spec->{
            spec.header("id","ID")
                .header("name","name")
                .rows(datas)
        })
        .write(new FileOutputStream("./target/test.csv"))
        .as(StepVerifier::create)
        .expectComplete()
        .verify();
ReactorExcel
        .readToMap(inputStream,"csv")
        .as(StepVerifier::create)
        .subscribe(map->System.out.println(map));

多sheet写出

 ReactorExcel
        .xlsxWriter()
        .sheet(sheet->{
             sheet.name("S1")
                  .header("id","ID")
                  .header("name","姓名")
                  .rows(dataFlux);
        })
        .sheet(sheet->{
             sheet.cell(0,0,"Name")
                  .cell(1,0,"Age")
                  .cell(0,1,"Test")
                  .cell(1,1,1)
                  .option(sheet_->{//自定义sheet操作
                     sheet_.addMergedRegion(CellRangeAddress.valueOf("A3:B3"));
                     sheet_.addMergedRegion(CellRangeAddress.valueOf("C1:C3"));
                    });
        })
        .write(new FileOutputStream("./target/test.xlsx"))
        .subscribe();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages