epplus

How to display percentages with decimals in an Epplus Pie chart?

佐手、 提交于 2019-12-02 08:23:56
问题 In a EPPLUS Pie chart, the percentages are rounded automatically by default, how can I display them with 2 decimals programatically (10.75 instead of 11) ? I only provide the values (integers) and the percentages are calculated automatically by the component. 回答1: Dont really see an option in EPPlus to set it - would have to be on the Serie.DataLabel object. Looks like it has to be done via XML. Here is an example of how to do it (might have to be tweaked for different chart types):

Data validation for each cell to check whether the value is available or not using EPplus

岁酱吖の 提交于 2019-12-02 07:55:22
I am using Epplus for uploading file.I have two sheet in .xlsx format.I want to ensure that each and every cell has value.For example in my excel i have dropdown box.If a user have details in first sheet and second sheet is empty.But this empty sheet have only one value which is added in sheet by mistake by use of this dropdown.So at this stage it will show object null reference error when it goes in to this loop for (int rowIterator = 2; rowIterator <= noOfRow; rowIterator++) { if (int.TryParse(s.Cells[rowIterator, 1].Value.ToString(), out n) && int.TryParse(s.Cells[rowIterator, 2].Value

How to set a collection of objects onto a row, one object per cell?

こ雲淡風輕ζ 提交于 2019-12-02 06:58:21
问题 With EPPlus, given a collection of objects, how do I set the objects on a row, one object per cell? That is, given: int rowNumber = ... int columnNumber = ... IEnumerable<object> values = ... How to set the values on the row rowNumber , starting on the column columnNumber , one value per cell? 回答1: Use the LoadFromArrays method on a range. The first cell where the arrays values should be set on the row is used to create the range. The argument passed to LoadFromArrays is an IEnumerable of

How to set a collection of objects onto a row, one object per cell?

[亡魂溺海] 提交于 2019-12-02 05:37:36
With EPPlus, given a collection of objects, how do I set the objects on a row, one object per cell? That is, given: int rowNumber = ... int columnNumber = ... IEnumerable<object> values = ... How to set the values on the row rowNumber , starting on the column columnNumber , one value per cell? Use the LoadFromArrays method on a range. The first cell where the arrays values should be set on the row is used to create the range. The argument passed to LoadFromArrays is an IEnumerable of object arrays, so the values to set on the row should be first converted to an object[] and then wrapped as an

Does EPPlus requires Excel to be installed on the sever?

淺唱寂寞╮ 提交于 2019-12-02 05:20:03
Does EPPlus requires Excel to be installed on the sever ? if Yes, any better alternatives for exporting bulk data using Entity Framework from Server side code to an excel file. No, it does not require Excel to be installed on the server, as you can read in the docs : EPPlus is a .NET library that reads and writes Excel files using the Office Open XML format (xlsx). EPPlus has no dependencies other than .NET. You do need to put the EPPlus assembly on the server though. 来源: https://stackoverflow.com/questions/52384106/does-epplus-requires-excel-to-be-installed-on-the-sever

Does EPPlus requires Excel to be installed on the sever?

让人想犯罪 __ 提交于 2019-12-02 03:09:45
问题 Does EPPlus requires Excel to be installed on the sever ? if Yes, any better alternatives for exporting bulk data using Entity Framework from Server side code to an excel file. 回答1: No, it does not require Excel to be installed on the server, as you can read in the docs: EPPlus is a .NET library that reads and writes Excel files using the Office Open XML format (xlsx). EPPlus has no dependencies other than .NET. You do need to put the EPPlus assembly on the server though. 来源: https:/

EPPlus, handling big ExcelWorksheet

若如初见. 提交于 2019-12-02 01:03:51
I'm using EPPlus to create xls report on daily and weekly basis. But sometimes the timeline is greater than one year and, in my last case it was three year, so the total amount of rows are around 180k. In this case I've optimized the query against a SQL Server DB but I think that my bottle neck is the "ExcelWorksheet" object: I'm guessing if there's chance to save it on file 50k rows per times instead of save it totally, so the memory usage could be less than now. Anyone has an idea about an implementation? Ernie S Unfortunately, I dont have the greatest news. Take a look at these: EPPlus

Too many If statements?

爷,独闯天下 提交于 2019-12-01 23:08:10
问题 I have a class that reads in text from a spreadsheet using EPPlus. It works and it does exactly what I want it to do but I feel the way I did it is bad practice but for the life of me I cant figure out an alternative that is less hard coded and uses less if statements. the class contains constants such as private static string configUserName; private static string configPassword; private static string configUrl; private static string configDatabase; //etc There are about 40 of these. The

how to copy ExcelWorkSheet from template with new CodeModule

北战南征 提交于 2019-12-01 21:39:36
问题 I am having an issue with copying a ExcelWorkSheet and the corresponding CodeModule of the copied sheet. Let me explain: Scenario: I have an excel file with macro's (.xlsm) and I use this excel file as a template to create an other excel file (data will be copied into the new file). So, first I fetch some data from a database and open the excel template ( .xlsm ) file. At a certain point, some entries need to be in different worksheets, this is where the 'WorkSheets.Add()' comes in. var

EPPlus Date Cell Datatype Not Working

白昼怎懂夜的黑 提交于 2019-12-01 20:44:15
问题 I have some code that accepts an IEnumerable and generates an Excel document from it. The objects in the IEnumerable have a date field, and I want those to be formatted as dates in Excel. However, when you look at it in Excel, the dates don't seem to be of the "date" data type until you double click in the cell, then press enter. When you do that, the values moves to right justified, and table filters work correctly. If you don't do the double click and enter thing, the value is left