Hello Everyone, I am having a problem with the CreateArrayFormula method. It does not seem to create an array formula in the final spreadsheet. Here is test code that creates the same conditions I have been experiencing in my project. I
wonder if I am doing something wrong?
static void Main(string args)
FileInfo test = new FileInfo(@"C:\csharpTest.xlsx");
using (ExcelPackage p = new ExcelPackage(test))
ExcelWorksheet ws = p.Workbook.Worksheets.Add("Test");
// I was not sure if the = was necessary, I tried with and without it. The result is the same.
Console.WriteLine("Successful file creation.");
Console.WriteLine("File not created.");
I have opened and inspected the worksheet XML as detailed in the FAQ. This is how they differ:
Working array formula XML:
- <row r="3" spans="4:4">
<f t="array" ref="D3">MIN(IF(bid_totals>0,bid_totals))</f>
Non-working array formula XML:
In order to get the working XML, I manually entered the array formula using CTRL+SHIFT ENTER.
My original project is in VB under VS2008. I wrote the test code in VS2010. I am using Office 2007.
Thanks for your time!