You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where i'm using exceljs to read a xlsx file and adding datavalidation, it works in Microsoft Excel Desktop App but it does not work in google sheets.
First i load the file
await workbook.xlsx.readFile(fullPath);
Then i create a sheet where all data that i need to add to the validator will be
This discussion was converted from issue #2239 on September 21, 2023 19:11.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
💬 Questions and Help
I have a project where i'm using exceljs to read a xlsx file and adding datavalidation, it works in Microsoft Excel Desktop App but it does not work in google sheets.
First i load the file
await workbook.xlsx.readFile(fullPath);
Then i create a sheet where all data that i need to add to the validator will be
const categoriesWS = workbook.addWorksheet('categories'); categories.forEach((category,index) => { categoriesWS.getCell('A${(index+1)}').value = category.name })
then i use a formula in the data validator
templateWS.dataValidations.add('F2:F9999', { type: 'list', allowBlank: false, formulae: ['=categories!A1:A${categories.length}'], showErrorMessage: true, errorStyle: 'error', error: 'The value Valid', });
at the end i hide that sheet
categoriesWS.state = 'hidden';
am i doing something wrong?
Version:
exceljs: "^4.3.2"
Beta Was this translation helpful? Give feedback.
All reactions