# reactor-excel **Repository Path**: tian_meng_study/reactor-excel ## Basic Information - **Project Name**: reactor-excel - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2024-06-24 - **Last Updated**: 2024-06-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 基于Reactor的excel,csv导入导出 [![Build Status](https://travis-ci.com/hs-web/reactor-excel.svg?branch=master)](https://travis-ci.com/hs-web/reactor-excel) [![codecov](https://codecov.io/gh/hs-web/reactor-excel/branch/master/graph/badge.svg)](https://codecov.io/gh/hs-web/reactor-excel) ```java 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(); ``` ```java ReactorExcel .readToMap(inputStream,"csv") .as(StepVerifier::create) .subscribe(map->System.out.println(map)); ``` 多sheet写出 ```java 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(); ```