How to Prevent exceljs from Adding @ to Formulas?

  Kiến thức lập trình

Stack Overflow community!

I’m using the exceljs library in Vue3 project to generate Excel files with formulas. However, I’ve noticed that exceljs automatically prepends an @ symbol to certain formulas, which I want to avoid. This behavior seems to be related to the implicit intersection operator introduced in Excel 2016, but it’s not desired in my use case.

When I set a formula in a cell using exceljs, like this:

worksheet.getCell('A1').value = { formula: `XLOOKUP(${fatherLetter}${rowNumber}, ${fatherCatalog || ''},${valorRange},"",0,1)` }

The resulting Excel file shows the formula as =@XLOOKUP(E2, Sheet2!$I$1:$I$2,Sheet2!$J$1:$J$2,"",0,1) instead of =XLOOKUP(E2, Sheet2!$I$1:$I$2,Sheet2!$J$1:$J$2,"",0,1)

New contributor

Silvestre Moreno Calderón is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT