Skip to main content

fastexcel-to-fesod

Migrates a Java project from FastExcel 1.3 (cn.idev.excel:fastexcel:1.3.0) to Apache Fesod (org.apache.fesod:fesod-sheet:2.0.1-incubating). Invoke this skill when asked to "migrate FastExcel to Fesod", "upgrade to Apache Fesod", or "replace cn.idev.excel". FastExcel 1.3 is the direct predecessor of Apache Fesod. Supports both legacy namespaces seen in real projects: cn.idev.excel.* and org.apache.fesod.excel.*. The entry classes FastExcel and FastExcelFactory are kept as @Deprecated aliases in Fesod, so call-site renames are strongly recommended but NOT required for compilation. The only breaking change is the Java package prefix.

ソース情報

リポジトリ
apache/fesod
ソースの最終更新活動
2026年8月28日 16:37
検出された SKILL.md の言語
英語
スター
6,274
フォーク
552

インストール方法

デフォルトでは、最初にソースを確認する Prompt が選択されています。直接コマンドに切り替えるか、ローカルコピーをダウンロードすることもできます。

ソースファイルを確認

インストールを決める前に、SKILL.md と SkillsMP に表示されている付属ファイルをお読みください。

SKILL.md を表示中

SKILL.md
ソースの指示 · 読み取り専用プレビュー
name
fastexcel-to-fesod
description
Migrates a Java project from FastExcel 1.3 (cn.idev.excel:fastexcel:1.3.0) to Apache Fesod (org.apache.fesod:fesod-sheet:2.0.1-incubating). Invoke this skill when asked to "migrate FastExcel to Fesod", "upgrade to Apache Fesod", or "replace cn.idev.excel". FastExcel 1.3 is the direct predecessor of Apache Fesod. Supports both legacy namespaces seen in real projects: cn.idev.excel.* and org.apache.fesod.excel.*. The entry classes FastExcel and FastExcelFactory are kept as @Deprecated aliases in Fesod, so call-site renames are strongly recommended but NOT required for compilation. The only breaking change is the Java package prefix.
<!-- - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. --> # FastExcel 1.3 → Apache Fesod Migration Skill ## Background FastExcel (`cn.idev.excel:fastexcel:1.3.0`) was donated to the Apache Software Foundation and reborn as **Apache Fesod (Incubating)**. The latest stable release is `2.0.1-incubating`. Key facts that affect how this migration works: - `cn.idev.excel.FastExcel` and `cn.idev.excel.FastExcelFactory` are renamed, but Fesod ships **`@Deprecated` bridge subclasses** at `org.apache.fesod.sheet.FastExcel` and `org.apache.fesod.sheet.FastExcelFactory` so existing call sites compile after a package-only swap. - The **only hard breaking change** is the Java package prefix: any `*.excel.*` imports must move to `*.sheet.*`. In practice, both of these are common and must be handled: - `cn.idev.excel.*` → `org.apache.fesod.sheet.*` - `org.apache.fesod.excel.*` → `org.apache.fesod.sheet.*` - The CGLIB naming tag changed from `ByFastExcelCGLIB` → `ByFesodCGLIB`. This only matters if the project inspects generated class names at runtime. - All annotation names, method signatures, and processing logic are identical. The official Fesod migration doc recommends a **three-phase gradual approach**; this skill implements all three phases in one pass, but each phase is clearly labelled so the developer can stop after Phase 1 or Phase 2 if needed. --- ## Phase 1 — Dependency swap (REQUIRED, zero code changes) This phase alone is sufficient to make the project compile and run on Fesod with deprecation warnings. It is always safe to stop here first and run tests. ### 1a. Maven — single-module project In `pom.xml`, find the FastExcel dependency block: ```xml <dependency> <groupId>cn.idev.excel</groupId> <artifactId>fastexcel</artifactId> <version>...</version> </dependency> ``` Replace it with: ```xml <dependency> <groupId>org.apache.fesod</groupId> <artifactId>fesod-sheet</artifactId> <version>2.0.1-incubating</version> </dependency> ``` Also remove the FastExcel version property if it exists, e.g.: ```xml <fastexcel.version>1.3.0</fastexcel.version> ``` ### 1b. Gradle In `build.gradle` (or `build.gradle.kts`), replace: ```groovy // Groovy DSL implementation 'cn.idev.excel:fastexcel:1.3.0' ``` with: ```groovy implementation 'org.apache.fesod:fesod-sheet:2.0.1-incubating' ``` Kotlin DSL: ```kotlin implementation("org.apache.fesod:fesod-sheet:2.0.1-incubating") ``` --- ## Phase 2 — Package import rename (REQUIRED for compilation) After swapping the dependency, any import under `*.excel.*` can be unresolved. Apply the following substitutions to every `.java` file in the project. Process the table **top-to-bottom** (most specific first) to avoid partial replacements. ### 2x. Scope guardrails (IMPORTANT) To avoid accidental regressions, apply replacements only in migration-relevant code. - ✅ Safe targets: - `import ...` lines under `cn.idev.excel.*` / `org.apache.fesod.excel.*` - static call sites such as `FastExcel.read(` / `FastExcel.write(` / `FastExcelFactory.*(` - ❌ Do **not** bulk-replace whole files or whole repositories for `FastExcel` text. - ❌ Do **not** modify business literals unless explicitly requested: - `@ExcelProperty("...")` labels - sheet names / file names / i18n text - controller response strings - ❌ Do **not** rewrite comments/Javadoc as part of mechanical migration. If you use scripted replacement, constrain the pattern to imports and call expressions, then review diffs before running tests. ### 2a0. Pre-migrated namespace cleanup (very common) Some repositories are already partially migrated and use `org.apache.fesod.excel.*` while still depending on older artifacts. After moving to `fesod-sheet`, these imports must be rewritten to `org.apache.fesod.sheet.*`. Apply this explicit replacement before the detailed mapping table: | Find | Replace with | |----------------------------------|----------------------------------| | `import org.apache.fesod.excel.` | `import org.apache.fesod.sheet.` | Then continue with the specific import mappings below. ### 2a. Core entry classes | Find (exact import string) | Replace with | |------------------------------------------|---------------------------------------------------| | `import cn.idev.excel.FastExcel;` | `import org.apache.fesod.sheet.FastExcel;` | | `import cn.idev.excel.FastExcelFactory;` | `import org.apache.fesod.sheet.FastExcelFactory;` | | `import cn.idev.excel.ExcelWriter;` | `import org.apache.fesod.sheet.ExcelWriter;` | | `import cn.idev.excel.ExcelReader;` | `import org.apache.fesod.sheet.ExcelReader;` | > **Note**: After this phase, `FastExcel.read(...)` and `FastExcelFactory.writerSheet(...)` > still compile — they resolve to the `@Deprecated` bridge classes in Fesod. > Phase 3 replaces them with the canonical `FesodSheet` class. ### 2b. Read API | Find | Replace with | |--------------------------------------------------------------|-----------------------------------------------------------------------| | `import cn.idev.excel.read.listener.ReadListener;` | `import org.apache.fesod.sheet.read.listener.ReadListener;` | | `import cn.idev.excel.read.listener.PageReadListener;` | `import org.apache.fesod.sheet.read.listener.PageReadListener;` | | `import cn.idev.excel.read.metadata.ReadSheet;` | `import org.apache.fesod.sheet.read.metadata.ReadSheet;` | | `import cn.idev.excel.read.metadata.ReadWorkbook;` | `import org.apache.fesod.sheet.read.metadata.ReadWorkbook;` | | `import cn.idev.excel.read.metadata.ReadBasicParameter;` | `import org.apache.fesod.sheet.read.metadata.ReadBasicParameter;` | | `import cn.idev.excel.read.builder.ExcelReaderBuilder;` | `import org.apache.fesod.sheet.read.builder.ExcelReaderBuilder;` | | `import cn.idev.excel.read.builder.ExcelReaderSheetBuilder;` | `import org.apache.fesod.sheet.read.builder.ExcelReaderSheetBuilder;` | | `import cn.idev.excel.context.AnalysisContext;` | `import org.apache.fesod.sheet.context.AnalysisContext;` | | `import cn.idev.excel.event.SyncReadListener;` | `import org.apache.fesod.sheet.event.SyncReadListener;` | ### 2c. Write API | Find | Replace with | |---------------------------------------------------------------|------------------------------------------------------------------------| | `import cn.idev.excel.write.metadata.WriteSheet;` | `import org.apache.fesod.sheet.write.metadata.WriteSheet;` | | `import cn.idev.excel.write.metadata.WriteWorkbook;` | `import org.apache.fesod.sheet.write.metadata.WriteWorkbook;` | | `import cn.idev.excel.write.metadata.WriteTable;` | `import org.apache.fesod.sheet.write.metadata.WriteTable;` | | `import cn.idev.excel.write.metadata.WriteBasicParameter;` | `import org.apache.fesod.sheet.write.metadata.WriteBasicParameter;` | | `import cn.idev.excel.write.builder.ExcelWriterBuilder;` | `import org.apache.fesod.sheet.write.builder.ExcelWriterBuilder;` | | `import cn.idev.excel.write.builder.ExcelWriterSheetBuilder;` | `import org.apache.fesod.sheet.write.builder.ExcelWriterSheetBuilder;` | | `import cn.idev.excel.write.builder.ExcelWriterTableBuilder;` | `import org.apache.fesod.sheet.write.builder.ExcelWriterTableBuilder;` | ### 2d. Write handlers | Find | Replace with | |-----------------------------------------------------------------------|--------------------------------------------------------------------------------| | `import cn.idev.excel.write.handler.WriteHandler;` | `import org.apache.fesod.sheet.write.handler.WriteHandler;` | | `import cn.idev.excel.write.handler.SheetWriteHandler;` | `import org.apache.fesod.sheet.write.handler.SheetWriteHandler;` | | `import cn.idev.excel.write.handler.CellWriteHandler;` | `import org.apache.fesod.sheet.write.handler.CellWriteHandler;` | | `import cn.idev.excel.write.handler.RowWriteHandler;` | `import org.apache.fesod.sheet.write.handler.RowWriteHandler;` | | `import cn.idev.excel.write.handler.WorkbookWriteHandler;` | `import org.apache.fesod.sheet.write.handler.WorkbookWriteHandler;` | | `import cn.idev.excel.write.handler.context.CellWriteHandlerContext;` | `import org.apache.fesod.sheet.write.handler.context.CellWriteHandlerContext;` | ### 2e. Annotations | Find | Replace with |
GitHubで見る
この SKILL.md は非常に大きいため、SkillsMP では最初のセクションだけを表示しています。 GitHubで見る