From 2bae031dd3201e5149b34975482d9f33fca6ea08 Mon Sep 17 00:00:00 2001 From: xleoken Date: Fri, 7 Aug 2026 16:34:11 +0800 Subject: [PATCH] docs: remove redundant blank line in java code block --- website/docs/sheet/fill/fill.md | 7 ------- website/docs/sheet/help/core-class.md | 21 ------------------- website/docs/sheet/read/converter.md | 2 -- website/docs/sheet/read/csv.md | 6 ------ website/docs/sheet/read/head.md | 4 ---- website/docs/sheet/read/num-rows.md | 2 -- website/docs/sheet/read/pojo.md | 5 ----- website/docs/sheet/read/sheet.md | 3 --- website/docs/sheet/read/simple.md | 10 --------- website/docs/sheet/read/spring.md | 3 --- website/docs/sheet/write/csv.md | 6 ------ website/docs/sheet/write/head.md | 3 --- website/docs/sheet/write/image.md | 1 - website/docs/sheet/write/sheet.md | 3 --- website/docs/sheet/write/simple.md | 4 ---- website/docs/sheet/write/spring.md | 1 - website/docs/sheet/write/style.md | 1 - .../current/sheet/fill/fill.md | 7 ------- .../current/sheet/help/core-class.md | 21 ------------------- .../current/sheet/read/converter.md | 2 -- .../current/sheet/read/csv.md | 6 ------ .../current/sheet/read/exception.md | 2 -- .../current/sheet/read/extra.md | 6 ------ .../current/sheet/read/head.md | 4 ---- .../current/sheet/read/num-rows.md | 2 -- .../current/sheet/read/pojo.md | 5 ----- .../current/sheet/read/sheet.md | 3 --- .../current/sheet/read/simple.md | 10 --------- .../current/sheet/read/spring.md | 3 --- .../current/sheet/write/csv.md | 6 ------ .../current/sheet/write/extra.md | 1 - .../current/sheet/write/head.md | 3 --- .../current/sheet/write/pojo.md | 2 -- .../current/sheet/write/sheet.md | 3 --- .../current/sheet/write/simple.md | 4 ---- .../current/sheet/write/spring.md | 1 - .../current/sheet/write/style.md | 5 ----- 37 files changed, 178 deletions(-) diff --git a/website/docs/sheet/fill/fill.md b/website/docs/sheet/fill/fill.md index c0f85bb66..88d57e4c7 100644 --- a/website/docs/sheet/fill/fill.md +++ b/website/docs/sheet/fill/fill.md @@ -33,7 +33,6 @@ Fill data into spreadsheet based on a template file using objects or Map. ### POJO Class ```java - @Getter @Setter @EqualsAndHashCode @@ -47,7 +46,6 @@ public class FillData { ### Code Example ```java - @Test public void simpleFill() { String templateFileName = "path/to/simple.xlsx"; @@ -91,7 +89,6 @@ Fill multiple data items into a template list, supporting in-memory batch operat ### Code Example ```java - @Test public void listFill() { String templateFileName = "path/to/list.xlsx"; @@ -130,7 +127,6 @@ Fill various data types in a template, including lists and regular variables. ### Code Example ```java - @Test public void complexFill() { String templateFileName = "path/to/complex.xlsx"; @@ -171,7 +167,6 @@ filled using `WriteTable`. ### Code Example ```java - @Test public void complexFillWithTable() { String templateFileName = "path/to/complexFillWithTable.xlsx"; @@ -214,7 +209,6 @@ Fill list data horizontally, suitable for scenarios with dynamic column numbers. ### Code Example ```java - @Test public void horizontalFill() { String templateFileName = "path/to/horizontal.xlsx"; @@ -251,7 +245,6 @@ Support filling multiple lists simultaneously, with prefixes to differentiate be ### Code Example ```java - @Test public void compositeFill() { String templateFileName = "path/to/composite.xlsx"; diff --git a/website/docs/sheet/help/core-class.md b/website/docs/sheet/help/core-class.md index 8e163ed28..f87110fdb 100644 --- a/website/docs/sheet/help/core-class.md +++ b/website/docs/sheet/help/core-class.md @@ -95,7 +95,6 @@ Set the background color to yellow and font color to blue for all content cells. Customise a `CellWriteHandler` ```java - @Slf4j public class CustomCellStyleHandler implements CellWriteHandler { @@ -124,7 +123,6 @@ public class CustomCellStyleHandler implements CellWriteHandler { Register and Use ```java - @Test public void customCellStyleWrite() { String fileName = "customCellStyleWrite.xlsx"; @@ -143,7 +141,6 @@ Insert a comment for the first row, second column of the header. Customise a `RowWriteHandler` ```java - @Slf4j public class CommentRowWriteHandler implements RowWriteHandler { @@ -167,7 +164,6 @@ public class CommentRowWriteHandler implements RowWriteHandler { Register and Use ```java - @Test public void commentWrite() { String fileName = "commentWrite.xlsx"; @@ -186,7 +182,6 @@ Add a dropdown list for the first column of the first two rows. Customise a `SheetWriteHandler` ```java - @Slf4j public class DropdownSheetWriteHandler implements SheetWriteHandler { @@ -209,7 +204,6 @@ public class DropdownSheetWriteHandler implements SheetWriteHandler { Register and Use ```java - @Test public void dropdownWrite() { String fileName = "dropdownWrite.xlsx"; @@ -265,7 +259,6 @@ core methods are as follows: Customise a `ReadListener` ```java - @Slf4j public class DemoDataListener implements ReadListener { @@ -301,7 +294,6 @@ public class DemoDataListener implements ReadListener { Use ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -317,7 +309,6 @@ public void simpleRead() { Customise a `ReadListener` ```java - @Slf4j public class HeadDataListener implements ReadListener { @@ -341,7 +332,6 @@ public class HeadDataListener implements ReadListener { Use ```java - @Test public void readWithHead() { String fileName = "path/to/demo.xlsx"; @@ -357,7 +347,6 @@ public void readWithHead() { Customise a `ReadListener` ```java - @Slf4j public class ExceptionHandlingListener implements ReadListener { @@ -383,7 +372,6 @@ public class ExceptionHandlingListener implements ReadListener { Use ```java - @Test public void readWithExceptionHandling() { String fileName = "path/to/demo.xlsx"; @@ -397,7 +385,6 @@ public void readWithExceptionHandling() { #### Pagination ```java - @Test public void pageRead() { String fileName = "path/to/demo.xlsx"; @@ -471,7 +458,6 @@ Core Features: Inherit `AnalysisEventListener` ```java - @Slf4j public class DemoDataListener extends AnalysisEventListener { @@ -515,7 +501,6 @@ public class DemoDataListener extends AnalysisEventListener { Use ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -534,7 +519,6 @@ customising header data parsing. Inherit `AnalysisEventListener` ```java - @Slf4j public class DemoDataListenerWithHead extends AnalysisEventListener { @@ -563,7 +547,6 @@ public class DemoDataListenerWithHead extends AnalysisEventListener { Use ```java - @Test public void readWithHead() { String fileName = "path/to/demo.xlsx"; @@ -582,7 +565,6 @@ errors, skip error lines, etc.). Inherit `AnalysisEventListener` ```java - @Slf4j public class ExceptionHandlingListener extends AnalysisEventListener { @@ -611,7 +593,6 @@ public class ExceptionHandlingListener extends AnalysisEventListener { Use ```java - @Test public void readWithExceptionHandling() { String fileName = "path/to/demo.xlsx"; @@ -699,7 +680,6 @@ You can customise converters, but the types must not overlap with the default ty Implement `Converter` ```java - @Slf4j public class TimestampNumberConverter implements Converter { @Override @@ -729,7 +709,6 @@ public class TimestampNumberConverter implements Converter { Use ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/docs/sheet/read/converter.md b/website/docs/sheet/read/converter.md index 242f73fcd..b6ff7541c 100644 --- a/website/docs/sheet/read/converter.md +++ b/website/docs/sheet/read/converter.md @@ -34,7 +34,6 @@ mechanism that allows users to define custom data conversion rules to meet vario ### POJO Class ```java - @Getter @Setter @EqualsAndHashCode @@ -79,7 +78,6 @@ public class CustomStringStringConverter implements Converter { ### Code Example ```java - @Test public void converterRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/docs/sheet/read/csv.md b/website/docs/sheet/read/csv.md index 4849b5266..cb1d85923 100644 --- a/website/docs/sheet/read/csv.md +++ b/website/docs/sheet/read/csv.md @@ -58,7 +58,6 @@ Additionally, Fesod provides constants in `CsvConstant` to simplify usage. If the CSV file uses `\u0000` as the separator, you can configure it as follows: ```java - @Test public void delimiterDemo() { String csvFile = "path/to/your.csv"; @@ -80,7 +79,6 @@ This should be set when field content contains delimiters or line breaks. #### Code Example ```java - @Test public void quoteDemo() { String csvFile = "path/to/your.csv"; @@ -99,7 +97,6 @@ separators (for example, Windows uses `CRLF`, while Unix/Linux uses `LF`). #### Code Example ```java - @Test public void recordSeparatorDemo() { String csvFile = "path/to/your.csv"; @@ -118,7 +115,6 @@ public void recordSeparatorDemo() { #### Code Example ```java - @Test public void nullStringDemo() { String csvFile = "path/to/your.csv"; @@ -136,7 +132,6 @@ public void nullStringDemo() { #### Code Example ```java - @Test public void escapeDemo() { String csvFile = "path/to/your.csv"; @@ -155,7 +150,6 @@ Supports directly building a `CSVFormat` object. ### Code Example ```java - @Test public void csvFormatDemo() { diff --git a/website/docs/sheet/read/head.md b/website/docs/sheet/read/head.md index 712df5386..f84bcb0b2 100644 --- a/website/docs/sheet/read/head.md +++ b/website/docs/sheet/read/head.md @@ -33,7 +33,6 @@ You can obtain header information by overriding the `invokeHead` method in the l ### Data Listener ```java - @Slf4j public class DemoHeadDataListener extends AnalysisEventListener { @Override @@ -54,7 +53,6 @@ public class DemoHeadDataListener extends AnalysisEventListener { ### Code Example ```java - @Test public void headerRead() { String fileName = "path/to/demo.xlsx"; @@ -77,7 +75,6 @@ classes. ### Code Example ```java - @Test public void complexHeaderRead() { String fileName = "path/to/demo.xlsx"; @@ -101,7 +98,6 @@ Set header POJO using the `head()` method. ### Code Example ```java - @Test public void headerPojoRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/docs/sheet/read/num-rows.md b/website/docs/sheet/read/num-rows.md index c226c6502..f4c10a17d 100644 --- a/website/docs/sheet/read/num-rows.md +++ b/website/docs/sheet/read/num-rows.md @@ -37,7 +37,6 @@ rows, i.e., read all rows. The row count includes header rows. ### Code Example ```java - @Test public void allSheetRead() { // Read the first 100 rows @@ -56,7 +55,6 @@ public void allSheetRead() { ### Code Example ```java - @Test public void singleSheetRead() { try (ExcelReader excelReader = FesodSheet.read(fileName, DemoData.class, new DemoDataListener()).build()) { diff --git a/website/docs/sheet/read/pojo.md b/website/docs/sheet/read/pojo.md index bdb8d0efa..4b914d1a0 100644 --- a/website/docs/sheet/read/pojo.md +++ b/website/docs/sheet/read/pojo.md @@ -36,7 +36,6 @@ dynamically generated spreadsheet files more flexible. #### POJO Class ```java - @Getter @Setter @EqualsAndHashCode @@ -55,7 +54,6 @@ public class IndexOrNameData { #### Code Example ```java - @Test public void indexOrNameRead() { String fileName = "path/to/demo.xlsx"; @@ -77,7 +75,6 @@ Use the `CellData` type to receive cell data to support formulas and various cel ### POJO Class ```java - @Getter @Setter @EqualsAndHashCode @@ -92,7 +89,6 @@ public class CellDataReadDemoData { ### Code Example ```java - @Test public void cellDataRead() { String fileName = "path/to/demo.xlsx"; @@ -116,7 +112,6 @@ directly. ### Data Listener ```java - @Slf4j public class NoModelDataListener extends AnalysisEventListener> { diff --git a/website/docs/sheet/read/sheet.md b/website/docs/sheet/read/sheet.md index 249f7b523..202ab2852 100644 --- a/website/docs/sheet/read/sheet.md +++ b/website/docs/sheet/read/sheet.md @@ -35,7 +35,6 @@ You can read multiple sheets from a spreadsheet file, but the same sheet cannot #### Reading All Sheets ```java - @Test public void readAllSheet() { String fileName = "path/to/demo.xlsx"; @@ -58,7 +57,6 @@ You can read a specific sheet from a spreadsheet file, supporting specification ### Code Example ```java - @Test public void readSingleSheet() { String fileName = "path/to/demo.xlsx"; @@ -87,7 +85,6 @@ This supports both **"normal hidden"** and **"very hidden"** states. ### Code Example ```java - @Test public void exceptionRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/docs/sheet/read/simple.md b/website/docs/sheet/read/simple.md index 1de5b893c..7b57588fe 100644 --- a/website/docs/sheet/read/simple.md +++ b/website/docs/sheet/read/simple.md @@ -41,7 +41,6 @@ Listeners cannot be managed by Spring and must be re-instantiated each time a sp #### `Lambda` Expressions ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -57,7 +56,6 @@ public void simpleRead() { #### Anonymous Inner Classes ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -79,7 +77,6 @@ public void simpleRead() { #### Data Listeners ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -104,7 +101,6 @@ structure, then read data through Fesod's listener mechanism. The `DemoData` POJO class corresponding to the spreadsheet structure: ```java - @Getter @Setter @EqualsAndHashCode @@ -120,7 +116,6 @@ public class DemoData { `DemoDataListener` is a custom listener used to process data read from spreadsheet. ```java - @Slf4j public class DemoDataListener implements ReadListener { @@ -139,7 +134,6 @@ public class DemoDataListener implements ReadListener { ### Code Example ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -162,7 +156,6 @@ data directly, where the key is the **column index** and the value is the **cell ### Data Listener ```java - @Slf4j public class NoModelDataListener extends AnalysisEventListener> { @@ -192,7 +185,6 @@ scenarios with **small data volumes**. The read data can be either a list of POJ The `DemoData` POJO class corresponding to the spreadsheet structure: ```java - @Getter @Setter @EqualsAndHashCode @@ -208,7 +200,6 @@ public class DemoData { #### Reading as POJO Object List ```java - @Test public void synchronousReadToObjectList() { String fileName = "path/to/demo.xlsx"; @@ -231,7 +222,6 @@ When not using POJOs, each row can be read as a Map, where the key is the column content. ```java - @Test public void synchronousReadToMapList() { String fileName = "path/to/demo.xlsx"; diff --git a/website/docs/sheet/read/spring.md b/website/docs/sheet/read/spring.md index 31f7d1a70..85e867628 100644 --- a/website/docs/sheet/read/spring.md +++ b/website/docs/sheet/read/spring.md @@ -59,7 +59,6 @@ Ensure the necessary dependencies are included in your pom.xml file: First, define a POJO class for mapping spreadsheet data: ```java - @Getter @Setter @ToString @@ -75,7 +74,6 @@ public class UploadData { Create a listener to handle each row of data: ```java - @Slf4j public class UploadDataListener extends AnalysisEventListener { private final List list = new ArrayList<>(); @@ -99,7 +97,6 @@ public class UploadDataListener extends AnalysisEventListener { Create a controller to handle file upload requests: ```java - @RestController @RequestMapping("/excel") public class ExcelController { diff --git a/website/docs/sheet/write/csv.md b/website/docs/sheet/write/csv.md index 6dee26251..38a93d767 100644 --- a/website/docs/sheet/write/csv.md +++ b/website/docs/sheet/write/csv.md @@ -58,7 +58,6 @@ provides constants in `CsvConstant` to simplify usage. If the CSV file uses `\u0000` as the separator, you can configure it as follows: ```java - @Test public void delimiterDemo() { String csvFile = "path/to/your.csv"; @@ -79,7 +78,6 @@ field content contains delimiters or line breaks. #### Code Example ```java - @Test public void quoteDemo() { String csvFile = "path/to/your.csv"; @@ -98,7 +96,6 @@ separators (for example, Windows uses `CRLF`, while Unix/Linux uses `LF`). #### Code Example ```java - @Test public void recordSeparatorDemo() { String csvFile = "path/to/your.csv"; @@ -117,7 +114,6 @@ For example, you can replace `null` objects with the string `"N/A"`. #### Code Example ```java - @Test public void nullStringDemo() { String csvFile = "path/to/your.csv"; @@ -135,7 +131,6 @@ public void nullStringDemo() { #### Code Example ```java - @Test public void escapeDemo() { String csvFile = "path/to/your.csv"; @@ -154,7 +149,6 @@ Supports directly building a `CSVFormat` object. ### Code Example ```java - @Test public void csvFormatDemo() { CSVFormat csvFormat = CSVFormat.DEFAULT.builder().setDelimiter(CsvConstant.AT).build(); diff --git a/website/docs/sheet/write/head.md b/website/docs/sheet/write/head.md index 83a96ea57..d1b462150 100644 --- a/website/docs/sheet/write/head.md +++ b/website/docs/sheet/write/head.md @@ -33,7 +33,6 @@ Supports setting multi-level headers by specifying main titles and subtitles thr ### POJO Class ```java - @Getter @Setter @EqualsAndHashCode @@ -50,7 +49,6 @@ public class ComplexHeadData { ### Code Example ```java - @Test public void complexHeadWrite() { String fileName = "complexHeadWrite" + System.currentTimeMillis() + ".xlsx"; @@ -75,7 +73,6 @@ Generate dynamic headers in real-time, suitable for scenarios where header conte ### Code Example ```java - @Test public void dynamicHeadWrite() { String fileName = "dynamicHeadWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/docs/sheet/write/image.md b/website/docs/sheet/write/image.md index c8c3b37ae..3dc23b5a0 100644 --- a/website/docs/sheet/write/image.md +++ b/website/docs/sheet/write/image.md @@ -33,7 +33,6 @@ Supports exporting images through various methods including files, streams, byte #### POJO Class ```java - @Getter @Setter @EqualsAndHashCode diff --git a/website/docs/sheet/write/sheet.md b/website/docs/sheet/write/sheet.md index 390efc8c4..f4ddad47a 100644 --- a/website/docs/sheet/write/sheet.md +++ b/website/docs/sheet/write/sheet.md @@ -35,7 +35,6 @@ Write data in batches to the same Sheet. ### Code Example ```java - @Test public void writeSingleSheet() { String fileName = "repeatedWrite" + System.currentTimeMillis() + ".xlsx"; @@ -64,7 +63,6 @@ Write data in batches to multiple Sheets, enabling paginated writing for large d ### Code Example ```java - @Test public void writeMultiSheet() { String fileName = "repeatedWrite" + System.currentTimeMillis() + ".xlsx"; @@ -93,7 +91,6 @@ Supports using multiple Tables within a single Sheet for segmented writing. ### Code Example ```java - @Test public void tableWrite() { String fileName = "tableWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/docs/sheet/write/simple.md b/website/docs/sheet/write/simple.md index 504ab304b..a6ee91aa4 100644 --- a/website/docs/sheet/write/simple.md +++ b/website/docs/sheet/write/simple.md @@ -36,7 +36,6 @@ This is the most basic and commonly used writing approach. The `DemoData` POJO class corresponding to the spreadsheet structure: ```java - @Getter @Setter @EqualsAndHashCode @@ -75,7 +74,6 @@ Fesod provides multiple writing methods, including `Lambda` expressions, data li #### `Lambda` Expression ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -89,7 +87,6 @@ public void simpleWrite() { #### Data List ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -103,7 +100,6 @@ public void simpleWrite() { #### `ExcelWriter` Object ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/docs/sheet/write/spring.md b/website/docs/sheet/write/spring.md index f489510da..db258aa8f 100644 --- a/website/docs/sheet/write/spring.md +++ b/website/docs/sheet/write/spring.md @@ -34,7 +34,6 @@ making it convenient to use Fesod in web environments. ### Code Example ```java - @GetMapping("download") public void download(HttpServletResponse response) throws IOException { response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); diff --git a/website/docs/sheet/write/style.md b/website/docs/sheet/write/style.md index 3b4a6de7d..d354ad1b2 100644 --- a/website/docs/sheet/write/style.md +++ b/website/docs/sheet/write/style.md @@ -64,7 +64,6 @@ public class DemoStyleData { ### Code Example ```java - @Test public void annotationStyleWrite() { String fileName = "annotationStyleWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/fill/fill.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/fill/fill.md index 950d7c9f0..399c65478 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/fill/fill.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/fill/fill.md @@ -16,7 +16,6 @@ title: '填充' ### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode @@ -30,7 +29,6 @@ public class FillData { ### 代码示例 ```java - @Test public void simpleFill() { String templateFileName = "path/to/simple.xlsx"; @@ -74,7 +72,6 @@ public void simpleFill() { ### 代码示例 ```java - @Test public void listFill() { String templateFileName = "path/to/list.xlsx"; @@ -113,7 +110,6 @@ public void listFill() { ### 代码示例 ```java - @Test public void complexFill() { String templateFileName = "path/to/complex.xlsx"; @@ -153,7 +149,6 @@ public void complexFill() { ### 代码示例 ```java - @Test public void complexFillWithTable() { String templateFileName = "path/to/complexFillWithTable.xlsx"; @@ -196,7 +191,6 @@ public void complexFillWithTable() { ### 代码示例 ```java - @Test public void horizontalFill() { String templateFileName = "path/to/horizontal.xlsx"; @@ -233,7 +227,6 @@ public void horizontalFill() { ### 代码示例 ```java - @Test public void compositeFill() { String templateFileName = "path/to/composite.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/core-class.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/core-class.md index b1d1d9f5e..6713fe984 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/core-class.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/help/core-class.md @@ -75,7 +75,6 @@ FesodSheet 提供了以下几种 WriteHandler 接口,分别用于处理不同 自定义 `CellWriteHandler` ```java - @Slf4j public class CustomCellStyleHandler implements CellWriteHandler { @@ -104,7 +103,6 @@ public class CustomCellStyleHandler implements CellWriteHandler { 注册并使用 ```java - @Test public void customCellStyleWrite() { String fileName = "customCellStyleWrite.xlsx"; @@ -123,7 +121,6 @@ public void customCellStyleWrite() { 自定义 `RowWriteHandler` ```java - @Slf4j public class CommentRowWriteHandler implements RowWriteHandler { @@ -147,7 +144,6 @@ public class CommentRowWriteHandler implements RowWriteHandler { 注册并使用 ```java - @Test public void commentWrite() { String fileName = "commentWrite.xlsx"; @@ -166,7 +162,6 @@ public void commentWrite() { 自定义 `SheetWriteHandler` ```java - @Slf4j public class DropdownSheetWriteHandler implements SheetWriteHandler { @@ -189,7 +184,6 @@ public class DropdownSheetWriteHandler implements SheetWriteHandler { 注册并使用 ```java - @Test public void dropdownWrite() { String fileName = "dropdownWrite.xlsx"; @@ -242,7 +236,6 @@ public void dropdownWrite() { 自定义 `ReadListener` ```java - @Slf4j public class DemoDataListener implements ReadListener { @@ -278,7 +271,6 @@ public class DemoDataListener implements ReadListener { 使用 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -294,7 +286,6 @@ public void simpleRead() { 自定义 `ReadListener` ```java - @Slf4j public class HeadDataListener implements ReadListener { @@ -318,7 +309,6 @@ public class HeadDataListener implements ReadListener { 使用 ```java - @Test public void readWithHead() { String fileName = "path/to/demo.xlsx"; @@ -334,7 +324,6 @@ public void readWithHead() { 自定义 `ReadListener` ```java - @Slf4j public class ExceptionHandlingListener implements ReadListener { @@ -360,7 +349,6 @@ public class ExceptionHandlingListener implements ReadListener { 使用 ```java - @Test public void readWithExceptionHandling() { String fileName = "path/to/demo.xlsx"; @@ -374,7 +362,6 @@ public void readWithExceptionHandling() { #### 分页处理 ```java - @Test public void pageRead() { String fileName = "path/to/demo.xlsx"; @@ -438,7 +425,6 @@ public void pageRead() { 继承 `AnalysisEventListener` ```java - @Slf4j public class DemoDataListener extends AnalysisEventListener { @@ -482,7 +468,6 @@ public class DemoDataListener extends AnalysisEventListener { 使用 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -500,7 +485,6 @@ public void simpleRead() { 继承 `AnalysisEventListener` ```java - @Slf4j public class DemoDataListenerWithHead extends AnalysisEventListener { @@ -529,7 +513,6 @@ public class DemoDataListenerWithHead extends AnalysisEventListener { 使用 ```java - @Test public void readWithHead() { String fileName = "path/to/demo.xlsx"; @@ -547,7 +530,6 @@ public void readWithHead() { 继承 `AnalysisEventListener` ```java - @Slf4j public class ExceptionHandlingListener extends AnalysisEventListener { @@ -576,7 +558,6 @@ public class ExceptionHandlingListener extends AnalysisEventListener { 使用 ```java - @Test public void readWithExceptionHandling() { String fileName = "path/to/demo.xlsx"; @@ -653,7 +634,6 @@ FesodSheet 默认提供了很多常用类型的转换器, 并已默认在 `Def 实现 `Converter` ```java - @Slf4j public class TimestampNumberConverter implements Converter { @Override @@ -683,7 +663,6 @@ public class TimestampNumberConverter implements Converter { 使用 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/converter.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/converter.md index 33ef36437..0be17d2fa 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/converter.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/converter.md @@ -16,7 +16,6 @@ Fesod 支持日期、数字、自定义格式转换。 ### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode @@ -61,7 +60,6 @@ public class CustomStringStringConverter implements Converter { ### 代码示例 ```java - @Test public void converterRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/csv.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/csv.md index bc0b3c9e3..d22fd5a21 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/csv.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/csv.md @@ -39,7 +39,6 @@ Fesod 通过不同的参数设计进行 CSV 如果 CSV 文件使用 `\u0000` 作为分隔符,可以如下设置: ```java - @Test public void delimiterDemo() { String csvFile = "path/to/your.csv"; @@ -59,7 +58,6 @@ public void delimiterDemo() { #### 代码示例 ```java - @Test public void quoteDemo() { String csvFile = "path/to/your.csv"; @@ -77,7 +75,6 @@ public void quoteDemo() { #### 代码示例 ```java - @Test public void recordSeparatorDemo() { String csvFile = "path/to/your.csv"; @@ -95,7 +92,6 @@ public void recordSeparatorDemo() { #### 代码示例 ```java - @Test public void nullStringDemo() { String csvFile = "path/to/your.csv"; @@ -113,7 +109,6 @@ public void nullStringDemo() { #### 代码示例 ```java - @Test public void escapeDemo() { String csvFile = "path/to/your.csv"; @@ -132,7 +127,6 @@ public void escapeDemo() { ### 代码示例 ```java - @Test public void csvFormatDemo() { diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/exception.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/exception.md index 38c53352b..b8427ebf1 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/exception.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/exception.md @@ -14,7 +14,6 @@ title: '异常处理' ## 数据监听器 ```java - @Slf4j public class DemoExceptionListener extends AnalysisEventListener { @Override @@ -39,7 +38,6 @@ public class DemoExceptionListener extends AnalysisEventListener { @Override @@ -40,7 +39,6 @@ public class DemoCommentExtraListener implements ReadListener { ### 代码示例 ```java - @Test public void extraRead() { String fileName = "path/to/demo.xlsx"; @@ -63,7 +61,6 @@ public void extraRead() { ### 数据监听器 ```java - @Slf4j public class DemoHyperLinkExtraListener implements ReadListener { @Override @@ -87,7 +84,6 @@ public class DemoHyperLinkExtraListener implements ReadListener { ### 代码示例 ```java - @Test public void extraRead() { String fileName = "path/to/demo.xlsx"; @@ -110,7 +106,6 @@ public void extraRead() { ### 数据监听器 ```java - @Slf4j public class DemoMergeExtraListener implements ReadListener { @Override @@ -134,7 +129,6 @@ public class DemoMergeExtraListener implements ReadListener { ### 代码示例 ```java - @Test public void extraRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/head.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/head.md index 64fcd0325..34e9cb60b 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/head.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/head.md @@ -16,7 +16,6 @@ title: '表头' ### 数据监听器 ```java - @Slf4j public class DemoHeadDataListener extends AnalysisEventListener { @Override @@ -37,7 +36,6 @@ public class DemoHeadDataListener extends AnalysisEventListener { ### 代码示例 ```java - @Test public void headerRead() { String fileName = "path/to/demo.xlsx"; @@ -59,7 +57,6 @@ public void headerRead() { ### 代码示例 ```java - @Test public void complexHeaderRead() { String fileName = "path/to/demo.xlsx"; @@ -83,7 +80,6 @@ public void complexHeaderRead() { ### 代码示例 ```java - @Test public void headerPojoRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/num-rows.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/num-rows.md index 78138e55d..8f067bde2 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/num-rows.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/num-rows.md @@ -17,7 +17,6 @@ title: '行数' ### 代码示例 ```java - @Test public void allSheetRead() { // 读取前100行 @@ -36,7 +35,6 @@ public void allSheetRead() { ### 代码示例 ```java - @Test public void singleSheetRead() { try (ExcelReader excelReader = FesodSheet.read(fileName, DemoData.class, new DemoDataListener()).build()) { diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/pojo.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/pojo.md index 5fd008aa5..c2f54a126 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/pojo.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/pojo.md @@ -18,7 +18,6 @@ title: '实体类' #### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode @@ -37,7 +36,6 @@ public class IndexOrNameData { #### 代码示例 ```java - @Test public void indexOrNameRead() { String fileName = "path/to/demo.xlsx"; @@ -59,7 +57,6 @@ public void indexOrNameRead() { ### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode @@ -74,7 +71,6 @@ public class CellDataReadDemoData { ### 代码示例 ```java - @Test public void cellDataRead() { String fileName = "path/to/demo.xlsx"; @@ -96,7 +92,6 @@ Fesod 支持不定义 POJO 类直接读取电子表格文件,通过 `Map> { diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/sheet.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/sheet.md index 368668f7b..f19e6c963 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/sheet.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/sheet.md @@ -18,7 +18,6 @@ title: 'Sheet' #### 读取全部 Sheet ```java - @Test public void readAllSheet() { String fileName = "path/to/demo.xlsx"; @@ -40,7 +39,6 @@ public void readAllSheet() { ### 代码示例 ```java - @Test public void readSingleSheet() { String fileName = "path/to/demo.xlsx"; @@ -66,7 +64,6 @@ public void readSingleSheet() { ### 代码示例 ```java - @Test public void exceptionRead() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/simple.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/simple.md index cbe4fa45c..fea34f884 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/simple.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/simple.md @@ -24,7 +24,6 @@ Fesod 提供监听器机制,用于在读取电子表格文件时对每一行 #### `Lambda` 表达式 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -40,7 +39,6 @@ public void simpleRead() { #### 匿名内部类 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -62,7 +60,6 @@ public void simpleRead() { #### 数据监听器 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -86,7 +83,6 @@ Fesod 提供了一种简单的方式来读取电子表格文件。用户只需 与电子表格结构对应的 POJO 类 `DemoData` ```java - @Getter @Setter @EqualsAndHashCode @@ -102,7 +98,6 @@ public class DemoData { `DemoDataListener` 是一个自定义监听器,用于处理从电子表格中读取的数据。 ```java - @Slf4j public class DemoDataListener implements ReadListener { @@ -121,7 +116,6 @@ public class DemoDataListener implements ReadListener { ### 代码示例 ```java - @Test public void simpleRead() { String fileName = "path/to/demo.xlsx"; @@ -144,7 +138,6 @@ Fesod 支持不定义 POJO 类直接读取电子表格文件,通过 `Map> { @@ -175,7 +168,6 @@ POJO 与电子表格结构对应的 POJO 类 `DemoData` ```java - @Getter @Setter @EqualsAndHashCode @@ -191,7 +183,6 @@ public class DemoData { #### 读取为 POJO 对象列表 ```java - @Test public void synchronousReadToObjectList() { String fileName = "path/to/demo.xlsx"; @@ -213,7 +204,6 @@ public void synchronousReadToObjectList() { 在不使用 POJO 情况下,可以将每一行读取为 Map,键为列索引,值为单元格内容。 ```java - @Test public void synchronousReadToMapList() { String fileName = "path/to/demo.xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/spring.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/spring.md index ac3b27cef..606434734 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/spring.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/read/spring.md @@ -40,7 +40,6 @@ title: '与 Spring 集成' 首先,定义一个用于映射电子表格数据的 POJO 类: ```java - @Getter @Setter @ToString @@ -56,7 +55,6 @@ public class UploadData { 创建一个监听器来处理每一行数据: ```java - @Slf4j public class UploadDataListener extends AnalysisEventListener { private final List list = new ArrayList<>(); @@ -80,7 +78,6 @@ public class UploadDataListener extends AnalysisEventListener { 创建一个控制器来处理文件上传请求: ```java - @RestController @RequestMapping("/excel") public class ExcelController { diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/csv.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/csv.md index 9cbe268e2..907500063 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/csv.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/csv.md @@ -39,7 +39,6 @@ Fesod 通过不同的参数设计进行 CSV 如果 CSV 文件使用 `\u0000` 作为分隔符,可以如下设置: ```java - @Test public void delimiterDemo() { String csvFile = "path/to/your.csv"; @@ -58,7 +57,6 @@ public void delimiterDemo() { #### 代码示例 ```java - @Test public void quoteDemo() { String csvFile = "path/to/your.csv"; @@ -76,7 +74,6 @@ public void quoteDemo() { #### 代码示例 ```java - @Test public void recordSeparatorDemo() { String csvFile = "path/to/your.csv"; @@ -94,7 +91,6 @@ public void recordSeparatorDemo() { #### 代码示例 ```java - @Test public void nullStringDemo() { String csvFile = "path/to/your.csv"; @@ -112,7 +108,6 @@ public void nullStringDemo() { #### 代码示例 ```java - @Test public void escapeDemo() { String csvFile = "path/to/your.csv"; @@ -131,7 +126,6 @@ public void escapeDemo() { ### 代码示例 ```java - @Test public void csvFormatDemo() { CSVFormat csvFormat = CSVFormat.DEFAULT.builder().setDelimiter(CsvConstant.AT).build(); diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/extra.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/extra.md index feca7114a..376ae4247 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/extra.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/extra.md @@ -117,7 +117,6 @@ public class WriteCellDemoData { ### 代码示例 ```java - @Test public void writeFormulaDataWrite() { String fileName = "writeCellDataWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/head.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/head.md index db7620d6f..c75e8f922 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/head.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/head.md @@ -16,7 +16,6 @@ title: '表头' ### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode @@ -33,7 +32,6 @@ public class ComplexHeadData { ### 代码示例 ```java - @Test public void complexHeadWrite() { String fileName = "complexHeadWrite" + System.currentTimeMillis() + ".xlsx"; @@ -58,7 +56,6 @@ public void complexHeadWrite() { ### 代码示例 ```java - @Test public void dynamicHeadWrite() { String fileName = "dynamicHeadWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/pojo.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/pojo.md index dbe92ba25..b3ca046b0 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/pojo.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/pojo.md @@ -18,7 +18,6 @@ title: '实体类' 忽略指定列 ```java - @Test public void excludeOrIncludeWrite() { String fileName = "excludeColumnFieldWrite" + System.currentTimeMillis() + ".xlsx"; @@ -61,7 +60,6 @@ public void excludeOrIncludeWrite() { ### POJO 类 ```java - @Getter @Setter @EqualsAndHashCode diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/sheet.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/sheet.md index f4604f460..be72c99f2 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/sheet.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/sheet.md @@ -18,7 +18,6 @@ title: 'Sheet 页' ### 代码示例 ```java - @Test public void writeSingleSheet() { String fileName = "repeatedWrite" + System.currentTimeMillis() + ".xlsx"; @@ -47,7 +46,6 @@ public void writeSingleSheet() { ### 代码示例 ```java - @Test public void writeMultiSheet() { String fileName = "repeatedWrite" + System.currentTimeMillis() + ".xlsx"; @@ -76,7 +74,6 @@ public void writeMultiSheet() { ### 代码示例 ```java - @Test public void tableWrite() { String fileName = "tableWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/simple.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/simple.md index 6e8afc928..3b44dd372 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/simple.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/simple.md @@ -18,7 +18,6 @@ title: '简单写入' 与电子表格结构对应的 POJO 类 `DemoData` ```java - @Getter @Setter @EqualsAndHashCode @@ -57,7 +56,6 @@ Fesod 提供了多种写入方式,包括 `Lambda` 表达式、数据列表、` #### `Lambda` 表达式 ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -71,7 +69,6 @@ public void simpleWrite() { #### 数据列表 ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -85,7 +82,6 @@ public void simpleWrite() { #### `ExcelWriter` 对象 ```java - @Test public void simpleWrite() { String fileName = "simpleWrite" + System.currentTimeMillis() + ".xlsx"; diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/spring.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/spring.md index 8c685db0e..81bc017fa 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/spring.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/spring.md @@ -16,7 +16,6 @@ Spring Boot 项目中可以通过 HTTP 接口生成电子表格文件并提供 ### 代码示例 ```java - @GetMapping("download") public void download(HttpServletResponse response) throws IOException { response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"); diff --git a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/style.md b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/style.md index 8d2a33bb0..622ae56d3 100644 --- a/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/style.md +++ b/website/i18n/zh-cn/docusaurus-plugin-content-docs/current/sheet/write/style.md @@ -47,7 +47,6 @@ public class DemoStyleData { ### 代码示例 ```java - @Test public void annotationStyleWrite() { String fileName = "annotationStyleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -73,7 +72,6 @@ public void annotationStyleWrite() { ### 代码示例 ```java - @Test public void handlerStyleWrite() { String fileName = "handlerStyleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -150,7 +148,6 @@ public class CustomCellStyleWriteHandler implements CellWriteHandler { 使用 ```java - @Test public void customCellStyleWrite() { String fileName = "customCellStyleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -173,7 +170,6 @@ public void customCellStyleWrite() { ### 代码示例 ```java - @Test public void poiStyleWrite() { String fileName = "poiStyleWrite" + System.currentTimeMillis() + ".xlsx"; @@ -232,7 +228,6 @@ public class WidthAndHeightData { ### 代码示例 ```java - @Test public void widthAndHeightWrite() { String fileName = "widthAndHeightWrite" + System.currentTimeMillis() + ".xlsx";