When saving an Excel file the formula is modified with an @ symbol for TEXTJOIN and IF (not sure if it is isolated to just IF or not).
An example of this is:
“=TEXTJOIN(” “,TRUE,IF(A1=List!$A$1:$A$10000,List!$B$1:$B$10000,”"))"
changes to
“=TEXTJOIN(” “,TRUE,IF(A1=@List!$A$1:$A$10000,List!$B$1:$B$10000,”"))"
I have created a working test case that can reproduce this on the latest version of Aspose.Cells for .NET.
var workbook = new Workbook();
workbook.Worksheets.Add(“List”);
var listSheet = workbook.Worksheets[“List”];
listSheet.Cells[0, 0].PutValue(“AAA”);
listSheet.Cells[0, 1].PutValue(“Value 1”);
listSheet.Cells[1, 0].PutValue(“AAA”);
listSheet.Cells[1, 1].PutValue(“Value 2”);
listSheet.Cells[2, 0].PutValue(“BBB”);
listSheet.Cells[2, 1].PutValue(“Value 3”);
var firstSheet = workbook.Worksheets[“Sheet1”];
firstSheet.Cells[0, 0].PutValue(“AAA”);
firstSheet.Cells[0, 1].Formula = “=TEXTJOIN(” “, TRUE, IF(A1=List!$A$1:$A$10000, List!$B$1:$B$10000, “”))”;
firstSheet.Cells[1, 0].PutValue(“BBB”);
firstSheet.Cells[1, 1].Formula = “=TEXTJOIN(” “, TRUE, IF(A2=List!$A$1:$A$10000, List!$B$1:$B$10000, “”))”;
var savePath = Path.Combine(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName, “Temp”, “TextJoin.xlsx”);
workbook.Save(savePath, Aspose.Cells.SaveFormat.Xlsx);
Can you let me know if this is a bug or if there is a valid workaround available?
Thanks