Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all 2262 articles
Browse latest View live

Commented Unassigned: .NET Core Support [15472]

$
0
0
now that we have the new NET Platform Standard system and .net core rc2 might be the time for this features?
Comments: We are currently experimenting with the unofficial port and it seems to do it's job! :) EPPlus.Core is available here: https://github.com/VahidN/EPPlus.Core

Commented Unassigned: InsertRow fails with "row cannot be less than 1" [15550]

$
0
0
I recently upgraded from 4.0.5 to 4.1.0 and noticed this error

The following code results in exception "row cannot be less than 1"

int xlRow = 18;
using (ExcelPackage xl = new ExcelPackage(pfReport, template))
{
var wb = xl.Workbook;
ExcelWorksheet sht = wb.Worksheets[1];
--> sht.InsertRow(xlRow, 1);
xl.Save();
}

Note that the template file contains text in cells below row 18

When rolling back to version 4.0.5 the code runs normally
Comments: In our case in turned out that it was an invalid NamedRange in the Excel template. You can check this by hitting CTRL+F3 in Excel. Search for #REF! in de Value column. After deleting this NamedRange the problem was solved. Error message is misleading because it suggests your parameters are invalid. Code fix would be something like checking for invalid namedRanges (in ExcelNamedRangeCollection.cs Insert method, in the for...each loop).

Created Unassigned: IndexOutOfRangeException when using LoadFromCollection with anonymous object [15555]

$
0
0
In `LoadFromCollection<T>(IEnumerable<T> Collection, bool PrintHeaders, TableStyles TableStyle, BindingFlags memberFlags, MemberInfo[] Members)` in ExcelRangeBase.cs, when `Members.Length` is zero, then the variable `row` is used with it's initial value of 0, which causes an IndexOutOfRangeException since it should be 1.

Edited Unassigned: IndexOutOfRangeException when using LoadFromCollection with anonymous object [15555]

$
0
0
In `LoadFromCollection<T>(IEnumerable<T> Collection, bool PrintHeaders, TableStyles TableStyle, BindingFlags memberFlags, MemberInfo[] Members)` in ExcelRangeBase.cs, when `Members.Count()` is zero then the `values` object array will have 0 columns, which causes an IndexOutOfRangeException when trying to set values in it.

Created Unassigned: Huge XLSX [15556]

$
0
0
Hi, I’m in trouble with an Excel generate with EPPLUS.
I have to generate a sheet with four DropDwnList (based on other four sheet) and prepare the sheet with minimum 2500 row.
looping in the code to generate it (only with 1000 row with 2500 I got an timeout) it takes 1 minute for the loop and 3 minutes for the save method.
There’s a way similar to drag & fill in EPPLUS
Can I speedup the save method.
Thanks
Michele

Commented Unassigned: ExcelRange.Value = null; throws an exception [15402]

$
0
0
Please find attached a sample application which opens a workbook and sets cell values to null. The workbook is inside the attachment ( ConsoleApplication1\bin\Debug\in.xlsx ).

The error message is:
Specified argument was out of the range of valid values.
Parameter name: Start cell Address must be less or equal to End cell address
at OfficeOpenXml.ExcelAddressBase.Validate()
at OfficeOpenXml.ExcelAddressBase.SetAddress(String address)
at OfficeOpenXml.ExcelAddress.set_Address(String value)
at OfficeOpenXml.ExcelRange.get_Item(String Address)
at OfficeOpenXml.ExcelRangeBase.SplitFormula(ExcelAddressBase address, Int32 ix)
at OfficeOpenXml.ExcelRangeBase.SplitFormulas(ExcelAddressBase address)
at OfficeOpenXml.ExcelRangeBase.Set_Value(Object value, Int32 row, Int32 col)
at OfficeOpenXml.ExcelRangeBase.SetValueAddress(ExcelAddress address, _setValue valueMethod, Object value)
at OfficeOpenXml.ExcelRangeBase.SetRange(_setValue valueMethod, Object value)
at OfficeOpenXml.ExcelRangeBase.set_Value(Object value)
Comments: The issue is in file "ExcelRangeBase.cs" in function "private void SplitFormulas(ExcelAddressBase address)": ``` //Bottom Range if (fRange._toRow > address._toRow) { if (fIsSet) { f = new ExcelWorksheet.Formulas(SourceCodeTokenizer.Default); f.Index = _worksheet.GetMaxShareFunctionIndex(false); f.IsArray = false; _worksheet._sharedFormulas.Add(f.Index, f); } f.StartCol = fRange._fromCol; f.StartRow = _toRow + 1; // THIS LINE IS BUGGY ``` has to be ``` //Bottom Range if (fRange._toRow > address._toRow) { if (fIsSet) { f = new ExcelWorksheet.Formulas(SourceCodeTokenizer.Default); f.Index = _worksheet.GetMaxShareFunctionIndex(false); f.IsArray = false; _worksheet._sharedFormulas.Add(f.Index, f); } f.StartCol = fRange._fromCol; f.StartRow = address._toRow + 1; // THIS FIXES THE CRASH ```

Created Unassigned: Getting a cellvalue in workbook slowing the performance in result [15557]

$
0
0
Hi ,
dll version : 4.0.5
I am using countifs formula then calculate function and after that when trying to get the cell value like ( String val22 = (String)SummarysheetModel.Cells[k, 201, k, 201].Value.ToString(); ) , system getting slow at debugging and release mode.

I have lots of entries in Excel worksheet and want to calculate each cell and show in new worksheet.

Please let me know if this is a correct to get the cell value.
sheet["B3"].Formula = "COUNTIFS(Data!V:V,\"CODE\",Data!AL:AL,\"MODEL\")";
sheet.Cells[k, 201, k, 201].Calculate();
String val22 = (String)sheet.Cells[k, 201, k, 201].Value.ToString();

Commented Unassigned: Styling charts with built-in eChartStyle enum does not conform to the built-int styles of Excel. [15543]

$
0
0
Hi,

I'm trying to style a normal bar chart and a pivot pie chart using the built-in Excel styles. However I ran a loop and generated a chart with each of the available enum (eChartStyle) options, and none of the styles look like the built-int styles available in MS Office Home and Business 2016. Is this a known issue, or am I going about it incorrectly?
Comments: Hi, I am facing similar issue. I have documented here http://stackoverflow.com/questions/37951998/epplus-excel-pie-chart-style-query Did you find any solution?

Created Unassigned: Excel O365 v2016 - Part is not a compound document [15558]

$
0
0
I have a file created in Office 365 v2016. When I try to load the document into memory I get "Part is not a compound document". Oddly enough, it does work in EPPlus 2.8.0.1. I've attached a sample.

The exact method is the ExcelPackage constructor taking System.IO.FileInfo and string password.

Created Unassigned: If EPPLUS could implement the function like EXCEL Rows.Group [15559]

$
0
0
Hi, about outline & group is less, if epplus could implement the function?

Created Unassigned: EPPlus corrupts files with shared formulas with error values [15560]

$
0
0
I open and save an xlsm file containing shared formulas having error values with EPPlus 4.1.0 like this:
```
var fi = new FileInfo("sharedFormulas.xlsm");
var package = new ExcelPackage(fi);
package.Save();
```
After saving the package, Excel couldn't open the file. It looks like the cells aren't marked as error typed.
The formulas contain user defined functions, but they don't seem to be the problem.
I attach the file before saving with EPPlus.

Commented Unassigned: ExcelWorksheet.SetValue throws ArgumentException [15541]

$
0
0
__ExcelWorksheet.SetValue(int,int,Object)__ throws an unexpected __System.ArgumentException__ caused by an invalid __System.Array.Copy__ in __CellStore.AddCell__. I suspect this exception occurs only when __CellStore.SplitPage__ creates a page for exactly _(2^n)_ rows. Then __CellStore<int>.GetSize__ will return the same value _(2^n)_ and the __CellStore.PageIndex.RowCount__ of this page will be equal to __CellStore.PageIndex.Rows.Length__. However, the page for the new cell should have at least one extra row available for that cell; otherwise __System.Array.Copy__ will throw an exception.
Comments: Do you have a test case that reproduces this issue?

Commented Unassigned: ExcelWorksheet.SetValue throws ArgumentException [15541]

$
0
0
__ExcelWorksheet.SetValue(int,int,Object)__ throws an unexpected __System.ArgumentException__ caused by an invalid __System.Array.Copy__ in __CellStore.AddCell__. I suspect this exception occurs only when __CellStore.SplitPage__ creates a page for exactly _(2^n)_ rows. Then __CellStore<int>.GetSize__ will return the same value _(2^n)_ and the __CellStore.PageIndex.RowCount__ of this page will be equal to __CellStore.PageIndex.Rows.Length__. However, the page for the new cell should have at least one extra row available for that cell; otherwise __System.Array.Copy__ will throw an exception.
Comments: I could find the exact location where this exception occured, but I deduced the cause through examination of the source code. Constructing a case to reproduce this failure will take some (spare) time, so you either have to be patient (I do not have a lot of spare time) or create this case yourself. Sorry to be so unpolite but I'm at work and have little time to comment on this; I patched my own source code by implementig a single retry in a __catch__ block for setting a value, not a very nice solution but it did the job.

Commented Unassigned: Unable to copy worksheets into other workbook [15350]

$
0
0
Hi,

We used EPPlus 3.1.3.3 till now and the following code worked very well.

```
private static ExcelPackage MergeExcelPackages(ExcelPackage aExcelPackage,
ExcelPackage bExcelPackage)
{
var excelPackage = new ExcelPackage();
excelPackage.Workbook.Worksheets.Add("AInfo", aExcelPackage.Workbook.Worksheets[1]);
excelPackage.Workbook.Worksheets.Add("BInfo", bExcelPackage.Workbook.Worksheets[1]);

return excelPackage;
}
```

Now, we are trying to upgrade EPPlus version to 4.0.4 and getting Index out of range error. Can you please let me know what's wrong with my code ?
Comments: Going back to the 4.0.0.0 Beta version fixed this issue for me.

Commented Issue: Removing Major Gridlines from chart? [14681]

$
0
0
I'm not sure if there is a better way, but after much messing around, I compared the two Excel files XML and found the section for the gridLines. Here's how I removed them:

' remove the major gridlines Dim nl As System.Xml.XmlNodeList = chart.ChartXml.GetElementsByTagName("c:majorGridlines") For i As Integer = 0 To nl.Count - 1 Dim n As System.Xml.XmlNode = nl(i) Dim pn As System.Xml.XmlNode = n.ParentNodepn.RemoveChild(n) Next

I'll see if I can add this functionallity
Comments: Have a PR here that will allow this https://epplus.codeplex.com/SourceControl/network/forks/aesalazar/Epplus/contribution/9025 Also showed someone how to do it here in C#: http://stackoverflow.com/questions/40804346/epplus-charts-without-gridlines-in-c-sharp-its-a-web-application/40809681#40809681 Ernie

Created Unassigned: Cell Union Operator Selection (commas) Bug in ExcelRange [15561]

$
0
0
I think someone uncovered a bug with the iterator of ExcelRange:

http://stackoverflow.com/questions/40870194/epplus-chartpie-barchart-selectedb2-b36-b38-etc-excel-cells/40876125#40876125

I came up with this unit test which will show the problem in an worksheet:

```
[TestMethod]
public void Chart_From_Cell_Union_Selector_Bug_Test()
{
var existingFile = new FileInfo(@"c:\temp\Chart_From_Cell_Union_Selector_Bug_Test.xlsx");
if (existingFile.Exists)
existingFile.Delete();

using (var pck = new ExcelPackage(existingFile))
{
var myWorkSheet = pck.Workbook.Worksheets.Add("Content");
var ExcelWorksheet = pck.Workbook.Worksheets.Add("Chart");

//Some data
myWorkSheet.Cells["A1"].Value = "A";
myWorkSheet.Cells["A2"].Value = 100; myWorkSheet.Cells["A3"].Value = 400; myWorkSheet.Cells["A4"].Value = 200; myWorkSheet.Cells["A5"].Value = 300; myWorkSheet.Cells["A6"].Value = 600; myWorkSheet.Cells["A7"].Value = 500;
myWorkSheet.Cells["B1"].Value = "B";
myWorkSheet.Cells["B2"].Value = 300; myWorkSheet.Cells["B3"].Value = 200; myWorkSheet.Cells["B4"].Value = 1000; myWorkSheet.Cells["B5"].Value = 600; myWorkSheet.Cells["B6"].Value = 500; myWorkSheet.Cells["B7"].Value = 200;

//Pie chart shows with EXTRA B2 entry due to problem with ExcelRange Enumerator
ExcelRange values = myWorkSheet.Cells["B2,B4,B6"]; //when the iterator is evaluated it will return the first cell twice: "B2,B2,B4,B6"
ExcelRange xvalues = myWorkSheet.Cells["A2,A4,A6"]; //when the iterator is evaluated it will return the first cell twice: "A2,A2,A4,A6"
var chartBug = ExcelWorksheet.Drawings.AddChart("Chart BAD", eChartType.Pie);
chartBug.Series.Add(values, xvalues);
chartBug.Title.Text = "Using ExcelRange";

//Pie chart shows correctly when using string addresses and avoiding ExcelRange
var chartGood = ExcelWorksheet.Drawings.AddChart("Chart GOOD", eChartType.Pie);
chartGood.SetPosition(10, 0, 0, 0);
chartGood.Series.Add("Content!B2,Content!B4,Content!B6", "Content!A2,Content!A4,Content!A6");
chartGood.Title.Text = "Using String References";

pck.Save();
}
}
```
And the output:

![Image](https://i.stack.imgur.com/ycRKA.png)

Seems what when the iterator is evaluated it include the first cell TWICE. You can see this in code if you inspect the ExcelRange object Results view.

Ernie

Created Unassigned: Column border quantum coupling [15562]

$
0
0
Downgrading to v. 4.0.3 fixed this issue for me.

Expected result:
- first two rows are bolded
- columsn 8, 10, 12 and 14 have dotted right border

Actual result:
- all columns up to column 14 have dotted right border for the first two rows. There is some coupling between Row() and Column() accessors?

```
// TEST
var w = excel.Worksheets.Add("test");
w.Row(1).Style.Font.Bold = true;
w.Row(2).Style.Font.Bold = true;

for (var i = 0; i < 4; i++)
{
w.Column(8 + 2*i).Style.Border.Right.Style = ExcelBorderStyle.Dotted;
}
```

Edited Unassigned: Column border quantum coupling [15562]

$
0
0
Downgrading to v. 4.0.3 fixed this issue for me.

Expected result:
- first two rows are bolded
- columns 8, 10, 12 and 14 have dotted right border

Actual result:
- all columns up to column 14 have dotted right border for the first two rows. There is some coupling between Row() and Column() accessors?

```
// TEST
var w = excel.Worksheets.Add("test");
w.Row(1).Style.Font.Bold = true;
w.Row(2).Style.Font.Bold = true;

for (var i = 0; i < 4; i++)
{
w.Column(8 + 2*i).Style.Border.Right.Style = ExcelBorderStyle.Dotted;
}
```

Created Unassigned: column border quantum coupling [15563]

$
0
0
Downgrading to v 4.0.3 fixed this issue.

Code to reproduce below.

Expected result:
- First two rows are bolded
- Columns 8, 10, 12 and 14 get a dotted right border style

Actual result:
- Every column up to 14 get dotted right border for the first two rows. I'd guess there is some reference that is not dropped correctly between Row() and Column() accessors.

```
// TEST
var w = excel.Worksheets.Add("test");
w.Row(1).Style.Font.Bold = true;
w.Row(2).Style.Font.Bold = true;

for (var i = 0; i < 4; i++)
{
w.Column(8 + 2*i).Style.Border.Right.Style = ExcelBorderStyle.Dotted;
}
```

Created Unassigned: worksheet.InsertRow >1024 bug [15564]

$
0
0
worksheet.InsertRow(4, 1025, 3);
The formula recorded on line 1026(or 1027) moves to 1025 rows
If insert less than or equal to 1024 records will not be such a bug.
Viewing all 2262 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>