English
excelpaste.parseData.before
About 171 wordsLess than 1 minute
2026-05-08
Execution Timing
Before parsing Excel pasted data
Parameters
| Parameter | Description | Type |
|---|---|---|
| addDatas | List of data to add | Array |
| param | Paste parameter object | Object |
Return Result
| Parameter | Description | Type |
|---|---|---|
| noRunBusiness | Flag indicating whether to skip business logic processing | Boolean |
Notes
- This hook is triggered before Excel pasted data is parsed and can be used to control whether subsequent business logic processing is executed.
- When the returned
noRunBusinessis true, the system skips subsequent business logic processing. - If the returned
noRunBusinessis false or is not returned, the system continues business logic processing.
Code Example
export default class Plugin {
apply() {
return [{
event: "excelpaste.parseData.before",
functional: this.parseData.bind(this)
},
];
}
async parseData(context){
let { addDatas, param } = context;
// Determine whether to skip business processing based on business logic
const shouldSkipBusiness = this.checkIfSkipBusiness(addDatas, param);
return{
noRunBusiness: shouldSkipBusiness
}
}
checkIfSkipBusiness(addDatas, param) {
// Custom business logic to determine whether business processing should be skipped
// For example, check whether the data meets specific conditions or whether the parameters contain special flags
return false;
}
}