This project has moved. For the latest updates, please go here.
1
Vote

Copying array formulas creates normal formulas

description

ExcelPackage ep = new ExcelPackage();

ExcelWorksheet sheet = ep.Workbook.Worksheets.Add("A Sheet");

sheet.Cells[1, 1].CreateArrayFormula("IF(SUM(B1:J1)>0,SUM(B2:J2))"); //A1
sheet.Cells[2, 1].Value = sheet.Cells[1, 1].IsArrayFormula; //A2
sheet.Cells[1, 1].Copy(sheet.Cells[3, 1]); //A3

ep.SaveAs(new FileInfo(@"..."));
Results in:
  • A1 -> {=IF(SUM(B1:J1)>0,SUM(B2:J2))}
  • A2 -> FALSE
  • A3 -> =IF(SUM(B1:J1)>0,SUM(B2:J2))
Where A2 should be TRUE and A3 {=IF(SUM(B1:J1)>0,SUM(B2:J2))} like A1

comments