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

CreateArrayFormula within a Table creates corrupt workbook #1851

Open
OssianEPPlus opened this issue Feb 6, 2025 · 0 comments
Open

CreateArrayFormula within a Table creates corrupt workbook #1851

OssianEPPlus opened this issue Feb 6, 2025 · 0 comments

Comments

@OssianEPPlus
Copy link
Contributor

OssianEPPlus commented Feb 6, 2025

We still have some issues with array formulas.

Notably something like:

 [TestMethod]
 public void DynamicArrayFormulaWithTwoCellsInTableGenerateCorruptWorkbook()
 {
     using (var package = OpenPackage("DynamicArrayTableNew.xlsx", true))
     {
         var wb = package.Workbook;
         var sheet = wb.Worksheets.Add("newWorksheet");

         var excelTable = sheet.Tables.Add(sheet.Cells["A1:D4"], "TableTest");

         sheet.Cells["D2:D3"].CreateArrayFormula("SUM(A2:B2 * 1)", true);

         SaveAndCleanup(package);
     }
 }

Creates a corrupt workbook.

Meanwhile in Excel selecting D2:D3 and applying =SUM(A2:B2 * 1) applies it to a tables whole column:
Image

Trying to apply it as an array formula (`ctrl+shift) results in an error:

Image

Epplus should also throw an error.

This is also somewhat related to #1314 and #1642

This issue also appears when IsDynamic is set to false.

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

1 participant