This project has moved and is read-only. For the latest updates, please go here.

Why do i not get the forumlar shown by Excel?

Jan 30, 2013 at 12:25 PM


I'm trying to get the formular of a cell in a worksheet. I know that the formular looks like this:


FileInfo excelFile = new FileInfo(@"S:\test\Refs.xlsx");
ExcelPackage excelPackage = new ExcelPackage(excelFile);

ExcelWorksheet excelWorksheet = excelPackage.Workbook.Worksheets [1];
var result = excelWorksheet.Cells ["A1"].Formula;

// result ends up being:
// [1]Sheet1!A1

Why do i not get the whole formular? and why has the [source1.xlsx] been resolved to [1]?