It is possible to generate dropdowns with multiple choice selection with ExcelJS and Angular?

807 views Asked by At

I am trying to develop a functionality in Angular with ExcelJS that allows me to generate an excel template downloadable from a website, so the user can fill it in with courses data and upload it again to save the data in my MongoDB database. I'm already generating this excel file and making it available to download.

The problem: Some of those excel course fields are arrays of values in my database, and I wish the user could selected from a dropdown in the excel.

Currently I am doing it with database simple fields, creating a 'dataValidation' for a cell and setting the value of 'formulae' with the options in other sheet like this:

worksheetCourses.getCell('D6').dataValidation = {
        type: 'list',
        formulae: [`${this.translate.instant('EducationAreas')}!$A$1:$A$${educationAreasData.length}`]
      };

So I get this result:

Simple value dropdown

Is there any way to generate a dropdown with multiple selection with excelJS or another similar library?

Does anyone know of a workaround that allows the user to select or enter multiple predefined values ​​for a cell in the generated excel?

Thanks

0

There are 0 answers