Questions tagged [epplus]

EPPlus is a .NET library that reads and writes Excel files using the Office Open XML format (xlsx) without the need of interop. EPPlus has no dependencies other than .NET.

EPPlus (now migrated to GitHub) supports:

  • Cell Ranges
  • Cell Styling (Border, Color, Fill, Font, Number, Alignments, Merge)
  • Charts
  • Pictures
  • Shapes
  • Comments
  • Tables
  • Protection
  • Encryption
  • Pivot Tables
  • Pivot Charts
  • Data Validation
  • Format Condition
  • Formula calculation
  • VBA

Support for .NET Core 2.0 was added in EPPlus 4.5.

1906 questions
23
votes
5 answers

Save as using EPPlus?

Does any one know how to use the package.Saveas function? package.SaveAs(tempFolderPathAlt + saveas + ".xlsx"); At the moment this is underlined in red with the following error: The best overloaded method match for …
Pomster
  • 14,567
  • 55
  • 128
  • 204
23
votes
1 answer

EPPlus with MemoryStream as email attachment -- file is empty

I'm building a console app that moves data into an excel file (using EPPlus library). I'm saving the ExcelPackage as a MemoryStream, and I want to attach it to an email. However, when I receive the email, the Excel file is empty -- 0…
Nate
  • 1,330
  • 1
  • 13
  • 23
23
votes
2 answers

EPPlus pivot tables/charts

I've been using EPPlus for .net for a while now but only for simple data manipulation. Are there any examples somewhere on how to use it to create pivot tables/charts? It seems to support it as I can see PivotTable in the intellisense but just…
user1468537
  • 693
  • 4
  • 13
  • 27
22
votes
3 answers

How can I create multistyled cell with EPPlus library for Excel

I use EPPlus for Excel file generation. I mean I need to convert HTML text (bold, italic, font color, name, size parameters) to Excel Cell. I suppose it needs to create the multi-styled cell, like: cell text is "hello!" the style I want is: he -…
Anton Norko
  • 2,166
  • 1
  • 15
  • 20
22
votes
3 answers

How can I give line break in excel epplus c#

I am using Epplus library to convert dataTable in Excel. I am using a textarea in my front end site. In which a line break is also there. But, the problem is when I convert this file to Excel, text shows in one line not with a line break. How can…
test twes
  • 251
  • 1
  • 2
  • 5
20
votes
5 answers

EPPlus - How to use a template

I have recently discovered EPPlus (http://epplus.codeplex.com/). I have an excel .xlsx file in my project with all the styled column headers. I read on their site that you can use templates. Does anyone know how or can provide code sample of how to…
Baxter
  • 5,633
  • 24
  • 69
  • 105
20
votes
3 answers

invoke formula in excel via epplus

I have an excel sheet in ASP.NET MVC4 C# project and I am able to read from excel sheet successfully using EPPlus. Now, I want to be able to pass in 2 numbers into cell C:2 and C:3 and be able to invoke formula in C:4 which is =SUM(C2:C3). So from…
dotnet-practitioner
  • 13,968
  • 36
  • 127
  • 200
20
votes
3 answers

Conditional Formatting by Expression using EPPlus

I'm trying to format some range by using conditional Formatting feature of EPPlus. I read many document but there is nowhere mentions about Conditional Formatting Expression. I'm very confusing. Don't know how to use that feature. Here are my some…
Han
  • 3,272
  • 3
  • 24
  • 39
20
votes
2 answers

Reading Excel spreasheet using EPPlus

Could someone point me in the right direction on how to read a Excel spreasheet, loop through all the rows and columns to retreive value using EPPlus and MVC? So fare I see examples to create a spreasheet, but did not find any on opening an excel…
sansid
  • 575
  • 3
  • 10
  • 20
19
votes
1 answer

Cell wrap using vb.net & EPPlus

I am trying to wrap a value in a cell using EPPlus and VB.net / ASP.Net Have anyone been able to do this? I searched SO & google, but no luck.
DNR
  • 3,706
  • 14
  • 56
  • 91
19
votes
1 answer

How can I filter columns (rather than rows) in EPPlus?

Filtering rows in a particular column is as easy as pie in EPPlus: private ExcelWorksheet prodUsageWorksheet; . . . prodUsageWorksheet.Cells["A6:A6"].AutoFilter = true; This allows me to filter the rows in column A: I also need to filter certain…
B. Clay Shannon-B. Crow Raven
  • 8,547
  • 144
  • 472
  • 862
19
votes
1 answer

Is it possible to copy row (with data, merging, style) in Excel using Epplus?

The problem is that I need to insert data into Excel from the collection several times using a single template for the entire collection. using (var pckg = new ExcelPackage(new FileInfo(association.TemplatePath))) { var workSheet =…
Renat Zamaletdinov
  • 1,210
  • 1
  • 21
  • 36
18
votes
4 answers

how to get EPPlus OpenXML row count (c#)

I searched for it and found the link C# EPPlus OpenXML count rows int iRowCount = currentWorksheet.Dimension.End.Row - currentWorksheet.Dimension.Start.Row; But this gives a value of 4721 as count. It is giving the whole row count, how can I get…
Murthy
  • 1,502
  • 11
  • 31
  • 45
18
votes
5 answers

EPPlus Font Family Not Affected

I'm using asp.net MVC 4 and epplus as a nuget package for exporting my data into an excel file. I do that as the following: var excel = new ExcelPackage(); var workSheet = excel.Workbook.Worksheets.Add("Consumption"); workSheet.View.RightToLeft =…
Varan Sinayee
  • 1,105
  • 2
  • 12
  • 26
18
votes
1 answer

Using EPPlus I want to Format all cells as TEXT in a spreadsheet

I want to format all cells of the spreadsheet as text before loading it with the datatable. Here is the sample code I am using StringBuilder sbitems = new StringBuilder(); sbitems.Append(@"select * from Items"); SqlDataAdapter daitems =…
siva
  • 357
  • 4
  • 7
  • 17