Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataFormatter.FormatCellValue does not support CONCAT function #136

Open
alexanderameye opened this issue May 3, 2024 · 5 comments
Open

Comments

@alexanderameye
Copy link

alexanderameye commented May 3, 2024

Hello,

After upgrading from 4.1.0 to 6.2.1, for the same Excel file, I now get the following error (while it worked before)

Issue with EXCEL(row 906, col 1): System.NotImplementedException: Error evaluating cell EXCEL!B907\r\n ---> NPOI.SS.Formula.Eval.NotImplementedFunctionException: _xlfn.CONCAT\r\n at NPOI.SS.Formula.UserDefinedFunction.Evaluate(ValueEval[] args, OperationEvaluationContext ec)\r\n at NPOI.SS.Formula.OperationEvaluatorFactory.Evaluate(OperationPtg ptg, ValueEval[] args, OperationEvaluationContext ec)\r\n at NPOI.SS.Formula.WorkbookEvaluator.EvaluateFormula(OperationEvaluationContext ec, Ptg[] ptgs)\r\n at NPOI.SS.Formula.WorkbookEvaluator.EvaluateAny(IEvaluationCell srcCell, Int32 sheetIndex, Int32 rowIndex, Int32 columnIndex, EvaluationTracker tracker)\r\n --- End of inner exception stack trace ---\r\n at NPOI.SS.Formula.WorkbookEvaluator.EvaluateAny(IEvaluationCell srcCell, Int32 sheetIndex, Int32 rowIndex, Int32 columnIndex, EvaluationTracker tracker)\r\n at NPOI.SS.Formula.WorkbookEvaluator.Evaluate(IEvaluationCell srcCell)\r\n at NPOI.XSSF.UserModel.BaseXSSFFormulaEvaluator.EvaluateFormulaCellValue(ICell cell)\r\n at NPOI.SS.Formula.BaseFormulaEvaluator.EvaluateFormulaCellEnum(ICell cell)\r\n at NPOI.SS.Formula.BaseFormulaEvaluator.EvaluateFormulaCell(ICell cell)\r\n at NPOI.SS.UserModel.DataFormatter.FormatCellValue(ICell cell, IFormulaEvaluator evaluator)\r\n at Npoi.Mapper.MapHelper.TryGetCellValue(ICell cell, Type targetType, TrimSpacesType trimSpacesType, Object& value, IFormulaEvaluator evaluator)\r\n at Npoi.Mapper.Mapper.LoadRowData[T](IEnumerable1 columns, IRow row, T target, RowInfo1 rowInfo)"

Do you have any idea why the CONCAT function might no longer be supported after the upgrade?

When I look at the changes in Npoi.Mapper.MapHelper.TryGetCellValue, it now uses CellDataFormatter.FormatCellValue while it didn't before.

Would appreciate the help, thanks!

@dcjxdd123
Copy link

Can you share your Excel file?

@alexanderameye
Copy link
Author

Can you share your Excel file?

Hey sure, this is the Excel that produces the issue for me.

CONCAT_ISSUE.xlsx

Thanks!

@dcjxdd123
Copy link

Can you share your Excel file?

Hey sure, this is the Excel that produces the issue for me.

CONCAT_ISSUE.xlsx

Thanks!

i think this is NPOI's error,
i just pr
nissl-lab/npoi#1088

@alexanderameye
Copy link
Author

Can you share your Excel file?

Hey sure, this is the Excel that produces the issue for me.
CONCAT_ISSUE.xlsx
Thanks!

i think this is NPOI's error, i just pr nissl-lab/npoi#1088

Thank you for this! Much appreciated! Is this now a matter of updating the version of NPOI that Npoi.Mapper uses?

@dcjxdd123
Copy link

Can you share your Excel file?

Hey sure, this is the Excel that produces the issue for me.
CONCAT_ISSUE.xlsx
Thanks!

i think this is NPOI's error, i just pr nissl-lab/npoi#1088

Thank you for this! Much appreciated! Is this now a matter of updating the version of NPOI that Npoi.Mapper uses?

Yes Wait NPOI 2.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants