'How to get the header row thats is (A or B or C) by passing the column name
I'm using exceljs library and I have Workbook with two sheets (masterdata and sheetB) In master_data sheet first column status is having values [1 2 3 4 5] and I want to create dropdown in sheetB using masterdata's status column values. Is there a way read column names header value (A) ? In this case the master_dat sheet status column header value that is A. so that I pass that A below in formulae field.
worksheet.getCell('A1').dataValidation = {
type: 'list',
allowBlank: true,
formulae: ['$A$1:$A$5']
};
Solution 1:[1]
you need to include the worksheet name:
worksheet.getCell('A1').dataValidation = {
type: 'list',
allowBlank: true,
formulae: ['masterdata!$A$1:$A$5']
};
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | traynor |
