qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
17.62k stars 1.68k forks source link

`CalcCellValue` silently fails when formula is `=OTHER_CELL` and OTHER_CELL has a formula evaluation error #1936

Open paolobarbolini opened 2 days ago

paolobarbolini commented 2 days ago

Description

CalcCellValue returns an empty string, with no error, if the evaluated cell references another cell (=OTHER_CELL) that contains a formula that fails to evaluate.

Steps to reproduce the issue:

  1. Create a new Excel file
  2. Write a number in A1
  3. Write a string in B1
  4. Write =A1+B1 in C1
  5. Write =C1 in D1
  6. Call CalcCellValue on D1

Repository: https://github.com/paolobarbolini/excelize-repro-1936

Describe the results you received:

An empty string is returned, with no error

Describe the results you expected:

A formula evaluation error

Output of go version:

go version go1.22.4 linux/amd64

Excelize version or commit ID:

4e6457accde38876ecdf8bb1c6f1e8bce8fd2139

Environment details (OS, Microsoft Excel™ version, physical, etc.):

Arch Linux with LibreOffice Calc v24.2.4-2