fix(Microsoft Excel 365 Node): Better error and description on unsupported range in upsert, update, getRange operations (#8452)

This commit is contained in:
Michael Kret
2024-01-26 13:33:29 +00:00
committed by GitHub
parent c70fa66e76
commit 8a595d1527
5 changed files with 51 additions and 7 deletions

View File

@@ -206,3 +206,14 @@ export function updateByAutoMaping(
return summary;
}
export const checkRange = (node: INode, range: string) => {
const rangeRegex = /^[A-Z]+:[A-Z]+$/i;
if (rangeRegex.test(range)) {
throw new NodeOperationError(
node,
`Specify the range more precisely e.g. A1:B5, generic ranges like ${range} are not supported`,
);
}
};