- Home
- Skills
- APIs & Backend
- excel batch import export
excel batch import export
Automates EasyExcel batch import/export for Spring Boot, MyBatis Plus, and LayUI admin panels.
Free
Works with the AI Agents you already use
excel batch import export
Example session with this skill installed
Add batch import and export for the ProductEntity table. Use productCode as the unique key. The admin page uses LayUI and the controller is at /admin/product.
- Read your context and instructions
- Compiled the excel batch import
I have implemented the batch Excel features for ProductEntity. I created a shared VO, added the endpoints to ProductController, and implemented the upsert logic in ProductService.
Product Excel Integration
// src/main/java/com/app/vo/ProductExcelVO.java
@Data
@ColumnWidth(22)
public class ProductExcelVO implements Serializable {
@ExcelProperty(value = "产品编码", index = 0)
private String productCode;
@ExcelProperty(value = "产品名称(必填)", index = 1)
private String productName;
@ExcelProperty(value = "价格", index = 2)
private BigDecimal price;
@ExcelProperty(value = "创建时间", index = 3)
private String createTime;
}
// LayUI Frontend Binding
function uploadRender() {
upload.render({
elem: '#productImport',
accept: 'file',
exts: 'xls|xlsx',
url: '/admin/product/import',
done: function (res) {
if (res.code === 200) {
layer.msg('导入成功');
table.reload('productTable');
}
}
});
}
Next steps
- Add the
com.alibaba:easyexceldependency to yourpom.xml. - Add the Import/Export buttons to your
toolbarDemoscript inproduct_list.html. - Restart the service and test with the generated "Download Template" link.
Connects securely to your tools. The creator never sees your data.
About this skill
Manual implementation of Excel processing in Spring Boot is repetitive and error-prone. This skill automates the creation of high-performance batch import and export features using the EasyExcel framework.
What it does
- Shared VO Generation: Creates a single
ExcelVOclass to synchronize import and export column mappings. - Controller Scaffolding: Implements endpoints for blank template downloads, filtered data exports, and file uploads.
- Upsert Logic: Handles data ingestion with intelligent matching to update existing records or insert new ones based on business keys.
- Frontend Integration: Provides ready-to-use LayUI and Thymeleaf snippets for toolbar buttons and asynchronous file uploads.
- Data Conversion: Manages date formatting and field mapping between database entities and Excel rows.
How it works
- Context Discovery: Read existing Controller and Entity files to identify target tables and business unique keys.
- VO Creation: Generate the
ExcelVOwith@ExcelPropertyannotations ensuring contiguous indexing. - Backend Implementation: Add the export, import, and template methods to the Spring Service and Controller layers.
- UI Binding: Insert the LayUI upload handlers and toolbar buttons into the admin page.
Frameworks & tools
Java, Spring Boot, MyBatis Plus, Alibaba EasyExcel, LayUI, Thymeleaf, and Maven.
Why this beats prompting it yourself
Standard prompts often fail to align VO column indexes or forget that LayUI requires re-binding upload elements after table re-renders. This skill enforces a strict shared-VO architecture and includes the necessary transaction management and front-end callbacks to prevent production data corruption.
Use cases
- Adding bulk product upload capabilities to an e-commerce inventory table.
- Implementing filtered report exports for administrative dashboards.
- Migrating legacy spreadsheet data into a MyBatis Plus managed database.
- Providing downloadable data entry templates for warehouse staff.
Known limitations
Requires a Spring Boot project with EasyExcel and MyBatis Plus already in the classpath. Targeted specifically at LayUI-based admin interfaces for the frontend implementation.
Requires EasyExcel and MyBatis Plus dependencies. Optimized for LayUI admin templates. Business unique keys must be clearly defined in the entity.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 2 days ago
- Free with an Agensi account