Skip to content

Commit f5e0949

Browse files
authored
Merge branch 'main' into docs-ppmc-up
2 parents 0f0a27a + 19ff542 commit f5e0949

File tree

33 files changed

+344
-103
lines changed

33 files changed

+344
-103
lines changed

.github/workflows/codeql-scan.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ on:
2929

3030
jobs:
3131
codeql:
32+
if: (github.event_name == 'schedule' && github.repository == 'apache/fesod') || (github.event_name != 'schedule')
3233
name: CodeQL Analysis
3334
runs-on: ubuntu-latest
3435
permissions:

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ on:
2323

2424
jobs:
2525
deploy:
26+
if: github.repository == 'apache/fesod'
2627
runs-on: ubuntu-latest
2728
steps:
2829
- uses: actions/checkout@v4

.github/workflows/fuzz-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424

2525
jobs:
2626
fuzz:
27+
if: (github.event_name == 'schedule' && github.repository == 'apache/fesod') || (github.event_name != 'schedule')
2728
runs-on: ubuntu-latest
2829
timeout-minutes: 360
2930
env:

.github/workflows/nightly.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ permissions:
2525
pull-requests: write
2626
jobs:
2727
nightly-test:
28+
if: (github.event_name == 'schedule' && github.repository == 'apache/fesod') || (github.event_name != 'schedule')
2829
runs-on: ubuntu-24.04
2930
strategy:
3031
matrix:

.github/workflows/preview-docs.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: Preview Documentation
19+
20+
on:
21+
pull_request:
22+
paths:
23+
- 'website/**'
24+
25+
jobs:
26+
deploy-preview:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
31+
- uses: pnpm/action-setup@v4
32+
with:
33+
version: 8
34+
run_install: false
35+
36+
- uses: actions/setup-node@v4
37+
with:
38+
node-version: "20"
39+
40+
- name: Corepack
41+
working-directory: website
42+
run: npm i -g --force corepack && corepack enable
43+
44+
- name: Install Dependencies
45+
working-directory: website
46+
run: pnpm install
47+
48+
- name: Build
49+
working-directory: website
50+
run: pnpm build
51+
52+
- name: Deploy to Netlify
53+
uses: nwtgck/[email protected]
54+
with:
55+
publish-dir: './website/build'
56+
production-deploy: false
57+
github-token: ${{ secrets.GITHUB_TOKEN }}
58+
deploy-message: ${{ github.event.pull_request.title }}
59+
enable-pull-request-comment: true
60+
enable-commit-comment: false
61+
enable-github-deployment: false
62+
alias: deploy-preview-${{ github.event.number }}
63+
env:
64+
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
65+
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ on:
2424

2525
jobs:
2626
publish:
27+
if: github.repository == 'apache/fesod'
2728
runs-on: ubuntu-latest
2829
steps:
2930
- name: Check out Git repository

README.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,16 @@
1515
- limitations under the License.
1616
-->
1717

18-
# Apache Fesod (Incubating)
18+
<p align="center">
19+
<a href="https://fesod.apache.org">
20+
<img alt="fesod" src="logo.svg" width="260">
21+
</a>
22+
</p>
23+
24+
<p align="center">
25+
<b>Readme</b>:
26+
<b><a href="README.md">English</a></b> | <a href="README_CN.md">中文</a>
27+
</p>
1928

2029
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/apache/fesod/ci.yml?style=flat-square&logo=github)](https://github.com/apache/fesod/actions/workflows/ci.yml)
2130
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/apache/fesod/nightly.yml?style=flat-square&logo=github&label=nightly)](https://github.com/apache/fesod/actions/workflows/nightly.yml)
@@ -24,6 +33,10 @@
2433
[![Document](https://img.shields.io/github/actions/workflow/status/apache/fesod/ci.yml?style=flat-square&logo=read-the-docs&label=Document)](https://fesod.apache.org/)
2534
[![DeepWiki](https://img.shields.io/badge/DeepWiki-apache%2Ffesod-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLHNak2AB7ZnyXZMEjXMGeK/AIi+QuHrMnbChYY7MIh8g01fJoopFb0uhhEqqcbWTp06/uv1saEDv4O3n3dV60RfP947Mm9/SQc0ICFQgzfc4CYZoTPAswgSJCCUJUnAAoRHOAUOcATwbmVLWdGoH//PB8mnKqScAhsD0kYP3j/Yt5LPQe2KvcXmGvRHcDnpxfL2zOYJ1mFwrryWTz0advv1Ut4CJgf5uhDuDj5eUcAUoahrdY/56ebRWeraTjMt/00Sh3UDtjgHtQNHwcRGOC98BJEAEymycmYcWwOprTgcB6VZ5JK5TAJ+fXGLBm3FDAmn6oPPjR4rKCAoJCal2eAiQp2x0vxTPB3ALO2CRkwmDy5WohzBDwSEFKRwPbknEggCPB/imwrycgxX2NzoMCHhPkDwqYMr9tRcP5qNrMZHkVnOjRMWwLCcr8ohBVb1OMjxLwGCvjTikrsBOiA6fNyCrm8V1rP93iVPpwaE+gO0SsWmPiXB+jikdf6SizrT5qKasx5j8ABbHpFTx+vFXp9EnYQmLx02h1QTTrl6eDqxLnGjporxl3NL3agEvXdT0WmEost648sQOYAeJS9Q7bfUVoMGnjo4AZdUMQku50McDcMWcBPvr0SzbTAFDfvJqwLzgxwATnCgnp4wDl6Aa+Ax283gghmj+vj7feE2KBBRMW3FzOpLOADl0Isb5587h/U4gGvkt5v60Z1VLG8BhYjbzRwyQZemwAd6cCR5/XFWLYZRIMpX39AR0tjaGGiGzLVyhse5C9RKC6ai42ppWPKiBagOvaYk8lO7DajerabOZP46Lby5wKjw1HCRx7p9sVMOWGzb/vA1hwiWc6jm3MvQDTogQkiqIhJV0nBQBTU+3okKCFDy9WwferkHjtxib7t3xIUQtHxnIwtx4mpg26/HfwVNVDb4oI9RHmx5WGelRVlrtiw43zboCLaxv46AZeB3IlTkwouebTr1y2NjSpHz68WNFjHvupy3q8TFn3Hos2IAk4Ju5dCo8B3wP7VPr/FGaKiG+T+v+TQqIrOqMTL1VdWV1DdmcbO8KXBz6esmYWYKPwDL5b5FA1a0hwapHiom0r/cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/apache/fesod)
2635

36+
**Home: [fesod.apache.org](https://fesod.apache.org)**
37+
**Email: <a href="mailto:[email protected]">Mail to `[email protected]`</a> to subscribe mailing lists**
38+
39+
2740
## Introduction
2841

2942
**Apache Fesod (Incubating)** is a high-performance and memory-efficient Java library for reading and writing Excel
@@ -58,7 +71,8 @@ new features in the latest version will enhance your experience.
5871
> will need to manually exclude POI-related jar files.
5972
6073

61-
> We are currently preparing for the first release under the Apache Incubator. Current releases were non-Apache releases. You can see previous verison in this link: https://fesod.apache.org/docs/quickstart/guide/
74+
> We are currently preparing for the first release under the Apache Incubator. Current releases were non-Apache
75+
> releases. You can see previous version in this link: https://fesod.apache.org/docs/quickstart/guide/
6276
6377
### Maven
6478

README_CN.md

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
<!--
2+
- Licensed to the Apache Software Foundation (ASF) under one or more
3+
- contributor license agreements. See the NOTICE file distributed with
4+
- this work for additional information regarding copyright ownership.
5+
- The ASF licenses this file to You under the Apache License, Version 2.0
6+
- (the "License"); you may not use this file except in compliance with
7+
- the License. You may obtain a copy of the License at
8+
-
9+
- http://www.apache.org/licenses/LICENSE-2.0
10+
-
11+
- Unless required by applicable law or agreed to in writing, software
12+
- distributed under the License is distributed on an "AS IS" BASIS,
13+
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
- See the License for the specific language governing permissions and
15+
- limitations under the License.
16+
-->
17+
18+
<p align="center">
19+
<a href="https://fesod.apache.org">
20+
<img alt="fesod" src="logo.svg" width="260">
21+
</a>
22+
</p>
23+
24+
<p align="center">
25+
<b>Readme</b>:
26+
<b><a href="README.md">English</a></b> | <a href="README_CN.md">中文</a>
27+
</p>
28+
29+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/apache/fesod/ci.yml?style=flat-square&logo=github)](https://github.com/apache/fesod/actions/workflows/ci.yml)
30+
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/apache/fesod/nightly.yml?style=flat-square&logo=github&label=nightly)](https://github.com/apache/fesod/actions/workflows/nightly.yml)
31+
[![GitHub License](https://img.shields.io/github/license/apache/fesod?logo=apache&style=flat-square)](https://github.com/apache/fesod/blob/main/LICENSE)
32+
![Maven Central Version](https://img.shields.io/maven-central/v/org.apache.fesod/fesod?logo=apachemaven&style=flat-square)
33+
[![Document](https://img.shields.io/github/actions/workflow/status/apache/fesod/ci.yml?style=flat-square&logo=read-the-docs&label=Document)](https://fesod.apache.org/)
34+
[![DeepWiki](https://img.shields.io/badge/DeepWiki-apache%2Ffesod-blue.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAyCAYAAAAnWDnqAAAAAXNSR0IArs4c6QAAA05JREFUaEPtmUtyEzEQhtWTQyQLH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cKaoqr+27/XcrS5UwSMbQAAAABJRU5ErkJggg==)](https://deepwiki.com/apache/fesod)
35+
36+
**官网: [fesod.apache.org](https://fesod.apache.org)**
37+
**邮件: <a href="mailto:[email protected]">发送至 ```[email protected]```</a>** 订阅邮件列表
38+
39+
## 简介
40+
41+
**Apache Fesod (Incubating)** 是一个高性能、内存高效的 Java 库,用于读写 Excel 文件,旨在简化开发并确保可靠性。
42+
43+
Apache Fesod (Incubating) 可以为开发者和企业提供极大的自由度和灵活性。我们计划在未来引入更多新功能,以持续提升用户体验和工具可用性。Apache Fesod (Incubating) 致力于成为您处理 Excel 文件的最佳选择。
44+
45+
名称 fesod(发音为 `/ˈfɛsɒd/`),是 "fast easy spreadsheet and other documents"(快速简单的电子表格和其他文档)的首字母缩写,表达了项目的起源、背景和愿景。
46+
47+
### 特性
48+
49+
- **高性能读写**:Apache Fesod (Incubating) 专注于性能优化,能够高效处理大规模 Excel 数据。与一些传统的 Excel 处理库相比,它可以显著减少内存消耗。
50+
- **简单易用**:该库提供了简单直观的 API,使开发者能够轻松将其集成到项目中,无论是简单的 Excel 操作还是复杂的数据处理。
51+
- **流式操作**:Apache Fesod (Incubating) 支持流式读取,最大程度地减少一次性加载大量数据的问题。这一设计在处理数十万甚至数百万行数据时尤其重要。
52+
53+
## 安装
54+
55+
Apache Fesod (Incubating) 需要 **Java 1.8** 或更高版本。建议使用最新的 LTS 版本的 Java。我们强烈建议使用最新版本的 Apache Fesod (Incubating),因为最新版本中的性能优化、错误修复和新功能将提升您的使用体验。
56+
57+
> 目前,Apache Fesod (Incubating) 使用 POI 作为底层包。如果您的项目已包含 POI 相关组件,您需要手动排除 POI 相关的 jar 文件。
58+
59+
> 我们目前正在准备 Apache 孵化器下的第一个版本。当前的版本都是非 Apache 版本。您可以通过此链接查看之前的版本:https://fesod.apache.org/docs/quickstart/guide/
60+
61+
### Maven
62+
63+
如果使用 Maven 进行项目构建,请在 `pom.xml` 文件中添加以下配置:
64+
65+
```xml
66+
67+
<dependency>
68+
<groupId>org.apache.fesod</groupId>
69+
<artifactId>fesod</artifactId>
70+
<version>version</version>
71+
</dependency>
72+
```
73+
74+
### Gradle
75+
76+
如果使用 Gradle 进行项目构建,请在 build.gradle 文件中添加以下配置:
77+
78+
```gradle
79+
dependencies {
80+
implementation 'org.apache.fesod:fesod:version'
81+
}
82+
```
83+
84+
## 快速开始
85+
86+
### 读取
87+
88+
以下是读取 Excel 文档的示例:
89+
90+
```java
91+
// 实现 ReadListener 接口以设置读取数据的操作
92+
public class DemoDataListener implements ReadListener<DemoData> {
93+
94+
@Override
95+
public void invoke(DemoData data, AnalysisContext context) {
96+
System.out.println("解析了一条数据" + JSON.toJSONString(data));
97+
}
98+
99+
@Override
100+
public void doAfterAllAnalysed(AnalysisContext context) {
101+
System.out.println("所有数据解析完成!");
102+
}
103+
}
104+
105+
public static void main(String[] args) {
106+
String fileName = "demo.xlsx";
107+
// 读取 Excel 文件
108+
Fesod.read(fileName, DemoData.class, new DemoDataListener()).sheet().doRead();
109+
}
110+
```
111+
112+
### 写入
113+
114+
以下是创建 Excel 文档的简单示例:
115+
116+
```java
117+
// 示例数据类
118+
public class DemoData {
119+
120+
@ExcelProperty("字符串标题")
121+
private String string;
122+
123+
@ExcelProperty("日期标题")
124+
private Date date;
125+
126+
@ExcelProperty("数字标题")
127+
private Double doubleData;
128+
129+
@ExcelIgnore
130+
private String ignore;
131+
}
132+
133+
// 准备要写入的数据
134+
private static List<DemoData> data() {
135+
List<DemoData> list = new ArrayList<>();
136+
for (int i = 0; i < 10; i++) {
137+
DemoData data = new DemoData();
138+
data.setString("String" + i);
139+
data.setDate(new Date());
140+
data.setDoubleData(0.56);
141+
list.add(data);
142+
}
143+
return list;
144+
}
145+
146+
public static void main(String[] args) {
147+
String fileName = "demo.xlsx";
148+
// 创建一个名为 "Template" 的工作表并写入数据
149+
Fesod.write(fileName, DemoData.class).sheet("Template").doWrite(data());
150+
}
151+
```
152+
153+
## 社区
154+
155+
### 贡献者
156+
157+
欢迎贡献者加入 Apache Fesod (Incubating)。请查看[贡献指南](./CONTRIBUTING.md)了解如何为该项目做出贡献。
158+
159+
感谢所有已经为 Apache Fesod (Incubating) 做出贡献的人们!
160+
161+
<a href="https://github.com/apache/fesod/graphs/contributors">
162+
<img src="https://contrib.rocks/image?repo=apache/fesod"/>
163+
</a>
164+
165+
> 注意:由于 GitHub 图片大小限制,仅显示前 100 名贡献者
166+
167+
### 订阅邮件列表
168+
169+
邮件列表是 Apache 社区中最受认可的交流形式。请通过以下邮件列表联系我们。
170+
171+
| 名称 | 邮件列表 |
172+
|:----------------------------------------------------|:--------------------------------------------------------------------------------------------------------------|
173+
| [[email protected]](mailto:[email protected]) | [订阅](mailto:[email protected])[取消订阅](mailto:[email protected]) |
174+
175+
### Star 历史
176+
177+
[![Star History Chart](https://api.star-history.com/svg?repos=apache/fesod&type=Date)](https://www.star-history.com/#apache/fesod&Date)
178+
179+
## 许可证
180+
181+
Apache Fesod (Incubating) 项目采用 [Apache License 2.0](LICENSE) 许可证。
182+

fesod/src/main/java/org/apache/fesod/excel/enums/poi/HorizontalAlignmentEnum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public enum HorizontalAlignmentEnum {
4242
GENERAL(HorizontalAlignment.GENERAL),
4343

4444
/**
45-
* The horizontal alignment is left-aligned, even in Rightto-Left mode.
45+
* The horizontal alignment is left-aligned, even in Right-to-Left mode.
4646
* Aligns contents at the left edge of the cell. If an indent amount is specified, the contents of
4747
* the cell is indented from the left by the specified number of character spaces. The character spaces are
4848
* based on the default font and font size for the workbook.

fesod/src/main/java/org/apache/fesod/excel/metadata/csv/CsvWorkbook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ public SheetVisibility getSheetVisibility(int sheetIx) {
378378
public void setSheetVisibility(int sheetIx, SheetVisibility visibility) {}
379379

380380
@Override
381-
public void addToolPack(UDFFinder toopack) {}
381+
public void addToolPack(UDFFinder toolpack) {}
382382

383383
@Override
384384
public void setForceFormulaRecalculation(boolean value) {}

0 commit comments

Comments
 (0)