Menu
  • HOME
  • TAGS

Conditional Formatting With Icons Epplus

epplus,epplus-4

Following is the code to do exactly what you want but it is for three icon set you can change it based on your icons. I'm setting red color arrow if value is greater than 4,yellow color arrow if value is between 1 and 4 and, finally, green color if...

Excel & EPPlus .NET library: Advanced DropDown list validation

excel,xlsx,epplus-4

I did it with the following code: //ExcelWorksheet ws var validation = ws.DataValidations.AddListValidation(cell.Address); validation.ShowErrorMessage = true; validation.ErrorStyle = ExcelDataValidationWarningStyle.stop; validation.ErrorTitle = "Error"; validation.Error = "Error Text"; // sheet with a name : DropDownLists // from DropDownLists sheet, get values from cells: !$A$1:$A$10 var formula = "=DropDownLists!$A$1:$A$10" validation.Formula.ExcelFormula = formula; ...

EPPlus: Auto-save feature supported?

c#,export-to-excel,epplus,epplus-4

Why not to save after every batch and open existing xls & do updates & save again? Just like ExcelPackage package = new ExcelPackage(newFile); (*plese note here that newFile is only variable name, in this context, it is more like existingFile) you will NOT lost what you already have in...

How to un-merge cells EPPlus?

c#,epplus,epplus-4

Are you running EPP 4.0.1? If so, it is a known issue: https://epplus.codeplex.com/workitem/15134 Someone posted a replacement setter for the Merge property (although the getter is still incorrect it seems). When I pasted their replacement setter in ExcelRangeBase.cs and recompiled this test method started working for me: [TestMethod] public void...

Importing excel file with all the conditional formatting rules to epplus

c#,epplus,epplus-4

I dont think EPP supports custom conditional formatting which are stored as "Workbook Extensions" in the xml of the Excel file. You could copy the xml node of the "extLst" which contains the custom formatting from one worksheet to another. Just make sure there is nothing else beside the cond...

EPPlus charts: how to plot vertical bar graph instead of the horizontal default

c#,graph,bar-chart,epplus,epplus-4

I think you want to use eChartType.ColumnClustered instead of eChartType.BarClustered since Direction is meant to be set at construction (took a peak at the source code). Like this: [TestMethod] public void Vertical_Bar_Chart() { var existingFile = new FileInfo(@"c:\temp\temp.xlsx"); if (existingFile.Exists) existingFile.Delete(); using (var package = new ExcelPackage(existingFile)) { var workbook...

EPPlus : date column returning int rather than the actual displayed text value

excel,epplus,epplus-4

If the dates are stored in excel as doubles (or a whole number if there is no time component) with formatting applied, which would be the "correct" way, you have recreate the date in code and reapply the date format applied in Excel. The only wrinkle is excel's formatting is...

EPPlus: ExcelChartSerie.Header loads once but doesn't update when cell is changed

c#,excel,graph,epplus,epplus-4

The problem is the you are creating a new Excel Address that is NOT attached to a worksheet when setting HeaderAddress. Its a very subtle but important difference because Excel would not know which sheet the address is actually associated with when looking for the header value (it would not...