Reputation: 41
I'm trying to use EPPlus to create a table on a worksheet. I can create the table, but all my @ variables become #Ref! when opening up the file. If I paste the exact same formula into Excel it takes it and has no problem. What am I missing here? Do I need to apply the table somehow after creating it? Thanks, Lee
private void ProcessVehicleData(BorrowingBase bbData, ExcelWorksheet ew, int colStart, int rowStart) {
int origFirstRow = rowStart;
foreach (DailyCAPS data in bbData.DailyCAPS) {
FillRow(ew, data, colStart, rowStart);
++rowStart;
}
try {
ExcelAddressBase eab = new ExcelAddressBase(origFirstRow - 1, ExcelColumnNameToNumber("A"), rowStart - 1, ExcelColumnNameToNumber("Y"));
ExcelTable et = ew.Tables.Add(eab, "VehicleData");
if (origFirstRow != rowStart) {
ew.Cells[origFirstRow, ExcelColumnNameToNumber("Y")].Formula = "=IF([@Inventory Days]>210,\"H\",IF([@TitleApp]+[@UtahTitleReceived]=0,\"B\",\"\"))";
}
}
catch { }
}
Upvotes: 1
Views: 779
Reputation: 3811
No,epplus can't do it.
Because epplus Tables.Add
is only pure data fill
not workbook query
,so =[@XXX]
is not work.
Upvotes: 0