natergj / excel4node

Node module to allow for easy Excel file creation
MIT License
1.38k stars 215 forks source link

Named cells #248

Open SferaDev opened 6 years ago

SferaDev commented 6 years ago

Excel allows a given Cell to have a name and refer to that cell using the name.

For example: A1 has name "_MyCell", B1 has formula "=_MyCell" and both output the same text.

Would this be easily implemented?

SferaDev commented 6 years ago

Checking the code I see there's support but no reference about it. I'm using:

workbook.definedNameCollection.addDefinedName({ refFormula: "'SheetName'!" + Excel.getExcelCellRef(rowId, 3), name: '_' + value.id });

But I guess it would make sense to have it from worksheet.