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

Created Unassigned: Inspect, delete or copy Conditional Formatting at cell or range level. [15000]

$
0
0
It would be very useful to be able to able to inspect, delete and copy the Conditional Formatting from a cell or range. As far as I know it is not possible in the latest Beta version. This is convenient if you are using file templates.
Thanks

Edited Issue: Data validation operators are not read from existing Excel files [14996]

$
0
0
If an Excel range has a data validation, and this includes an operator, EPPlus does not read the operator, and so if the file is then saved, these are lost.

Sample code to demonstrate this:

```
var fileName = @"D:\temp\testvalidation.xlsx";

if(File.Exists(fileName))
File.Delete(fileName);

using(var ep = new ExcelPackage(new FileInfo(fileName)))
{
var workbook = ep.Workbook;
var worksheet = workbook.Worksheets.Add("Testing");

var validation = worksheet.Cells[1, 1].DataValidation.AddIntegerDataValidation();
validation.Operator = OfficeOpenXml.DataValidation.ExcelDataValidationOperator.greaterThanOrEqual;
validation.Formula.Value = 0;
validation.ShowErrorMessage = true;

Console.WriteLine((worksheet.DataValidations.First() as ExcelDataValidationInt).Operator);

ep.Save();

}

using(var ep = new ExcelPackage(new FileInfo(fileName)))
{
var worksheet = ep.Workbook.Worksheets.First();

Console.WriteLine((worksheet.DataValidations.First() as ExcelDataValidationInt).Operator);

ep.Save();

}

```

Appears to be the case in versions 3 and 4.

Closed Issue: Data validation operators are not read from existing Excel files [14996]

$
0
0
If an Excel range has a data validation, and this includes an operator, EPPlus does not read the operator, and so if the file is then saved, these are lost.

Sample code to demonstrate this:

```
var fileName = @"D:\temp\testvalidation.xlsx";

if(File.Exists(fileName))
File.Delete(fileName);

using(var ep = new ExcelPackage(new FileInfo(fileName)))
{
var workbook = ep.Workbook;
var worksheet = workbook.Worksheets.Add("Testing");

var validation = worksheet.Cells[1, 1].DataValidation.AddIntegerDataValidation();
validation.Operator = OfficeOpenXml.DataValidation.ExcelDataValidationOperator.greaterThanOrEqual;
validation.Formula.Value = 0;
validation.ShowErrorMessage = true;

Console.WriteLine((worksheet.DataValidations.First() as ExcelDataValidationInt).Operator);

ep.Save();

}

using(var ep = new ExcelPackage(new FileInfo(fileName)))
{
var worksheet = ep.Workbook.Worksheets.First();

Console.WriteLine((worksheet.DataValidations.First() as ExcelDataValidationInt).Operator);

ep.Save();

}

```

Appears to be the case in versions 3 and 4.

Comments: Thanks!

Closed Unassigned: NullReferenceException on ExcelPackage Dispose (4.0 Beta 2) [14993]

$
0
0
Using 4.0 Beta 2, ExcelPackage Dispose() is throwing a NullReferenceException after opening a blank Excel file. Please see attached sample simple Console Application for example.

Could be related to: https://epplus.codeplex.com/workitem/14979
Comments: Thanks!

Created Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.

Created Unassigned: Issue with Move Sheet [15002]

$
0
0
Hi

EPPLus creates a empty sheet when the source and target position are the same. Due to this there is a problem when closing the package.

There should be a check in the Move() method of ExcelWorksheet.cs that does not proceed further if the sourcePositionId and targetPositionId are same

~Sanket


Created Unassigned: Can't load workbook with a defined Name that refers to a table [15003]

$
0
0
In Excel 2013:

1. Create an empty workbook
2. Add a table and change its name to tab, then give it a column named Col
3. Put a few sample values in the Col column
4. Define a name and in the refers to box put: Tab[Col]
5. Save the workbook

When you open this workbook in EPPlus, it fails with an error that Tab[Col] is not a valid address.

Tested with version 3.1.3 from NuGet


Commented Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: I think this is fixed in one of the recent patches. Try getting the latest source code and test with that.

Commented Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: Ok this is the craziest thing. I did like you suggested, downloaded the source code and started testing. The problem was STILL there. So, I started slowly working thru the epplus code and got to the section that was failing and figured out the worksheet that had the issue (KPI Summary). It was failing in here: RemoveUnusedStyles() ``` while(cse.Next()) { CellXfs[cse.Value].useCnt++; } ``` I then started stepping thru each line (on the worksheet that was failing). I kept at it, moving slowly trying to understand what I was seeing. After awhile, I stepped back into RemoveUnusedStyles() and IT DIDN'T FAIL?!? At this point, the file appears to be fixed, including when I take the backup that I created and try against that file. I have no idea whatsoever how that fixed it, but it seems to have. Very, very strange.

Commented Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: Nevermind, I had messed up my testing. The source code is indeed working and the only crazy thing is my testing. Paul thank you very much for the source code suggestion as that appears to have fixed the issue. I'm assuming it's relatively safe to use that version?

Commented Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: The issue is resolved, however I'm unsure how to mark it resolved.

Commented Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: The 4.0 beta version does NOT have this fix.

Closed Unassigned: Issue with Move Sheet [15002]

$
0
0
Hi

EPPLus creates a empty sheet when the source and target position are the same. Due to this there is a problem when closing the package.

There should be a check in the Move() method of ExcelWorksheet.cs that does not proceed further if the sourcePositionId and targetPositionId are same

~Sanket


Comments: Thanks!

Closed Unassigned: InvalidOperationException on 2nd Save call [15001]

$
0
0
I have an xlsm file that is fairly complex and was created by a coworker of mine. A recent change has now caused an issue when trying to save the file a 2nd time. I'm getting an InvalidOperationException and the inner exception is "Index was outside the bounds of the array.".

EPPlus has been working fine up until now, however I'm unsure what is causing the issue. I'll attach the excel file in the hopes that someone is able to determine what the issue may be.

Thank you for your time and effort on this library.
Comments: Ok, thanks for notifying us that you resolved this yourself.

Closed Unassigned: Change GetColumnLetter to a public method [14997]

$
0
0
It would be very useful to have GetColumnLetter() as a public method for use in adding formulas.
Comments: Ok, good suggestion. I have added it as a static method on the ExcelCellAddress. It will be included in next release.

Commented Unassigned: Bug when saving a workbook loaded from a template [14988]

$
0
0
I'm not entirely sure this is a bug, but since it's about code that worked in previous versions and doesn't work now, I thought creating an issue was the appropriate course of action.

This code, which worked in previous versions (before the switch to DotNetZip) is now broken:
```
using (var templateStream = File.OpenRead(TEMPLATE_PATH))
using (var outStream = File.Open(OUTPUT_PATH, FileMode.Create, FileAccess.ReadWrite, FileShare.None))
using (var package = new ExcelPackage(outStream, templateStream))
{
// Create more content
package.Save();
}
```
The output file is created, but it's an exact copy of the template file. The new file contents are written to a memory stream which gets discarded right away.

Luckily, the following (almost equivalent) code works:
```
using (var package = new ExcelPackage(new FileInfo(OUTPUT_PATH), new FileInfo(TEMPLATE_PATH)))
{
// Create more content
package.Save();
}
```

The problem seems to lie in ExcelPackage.Save, which does not copy the memory stream resulting from _package.Save() to its output stream if it wasn't initialized with a file. This does not look like intended behavior; more like unfinished work, IMHO.
Comments: I too am having an issue with memory streams. It used to work without even supplying a template using the ExcelPackage constructor with just the stream argument.

Created Unassigned: Issue in DefaultRowheight when Cell content Assigned throught formula [15004]

Edited Unassigned: Issue in DefaultRowheight when Cell content Assigned throught formula [15004]

Edited Unassigned: Issue in DefaultRowheight when Cell content Assigned throught formula [15004]

$
0
0
Hi


i am generating excel report using Epplus 4.0 Beat 2 Class library, i am assigning Cell Content through Formula,in order to wrap the cell content i set wraptext property as true, the Cell Content gets wrapped but DefaultRowheight is not altered automatically(not fit into the call propely) so manually we need to set this value, where as if i assign Cell Content through Value ( cell.Value = "" ) then Cell Content is fit into the Specific Cell, text also wrapping properly


Code Sample:

ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Sample");

var cell = ws.Cells[1, 1];
cell.Value = "This example program to test the functionality of wrap text as formula or value";

//cell.Formula = @"=" + "\"" + "This example program to test the functionality of wrap text as formula or value" + "\"";

cell.Style.WrapText = true;
cell.Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;
cell.Style.VerticalAlignment = ExcelVerticalAlignment.Center;

Byte[] bArray = pck.GetAsByteArray();
string fName = Guid.NewGuid().ToString() + ".xlsx";
string fFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), fName);
System.IO.File.WriteAllBytes(fFile, bArray);

System.Diagnostics.ProcessStartInfo process = new System.Diagnostics.ProcessStartInfo(fFile);
System.Diagnostics.Process.Start(process);

Note: please review the attachment also

Commented Unassigned: Issue in DefaultRowheight when Cell content Assigned throught formula [15004]

$
0
0
Hi


i am generating excel report using Epplus 4.0 Beat 2 Class library, i am assigning Cell Content through Formula,in order to wrap the cell content i set wraptext property as true, the Cell Content gets wrapped but DefaultRowheight is not altered automatically(not fit into the call propely) so manually we need to set this value, where as if i assign Cell Content through Value ( cell.Value = "" ) then Cell Content is fit into the Specific Cell, text also wrapping properly


Code Sample:

ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Sample");

var cell = ws.Cells[1, 1];
cell.Value = "This example program to test the functionality of wrap text as formula or value";

//cell.Formula = @"=" + "\"" + "This example program to test the functionality of wrap text as formula or value" + "\"";

cell.Style.WrapText = true;
cell.Style.HorizontalAlignment = ExcelHorizontalAlignment.Center;
cell.Style.VerticalAlignment = ExcelVerticalAlignment.Center;

Byte[] bArray = pck.GetAsByteArray();
string fName = Guid.NewGuid().ToString() + ".xlsx";
string fFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), fName);
System.IO.File.WriteAllBytes(fFile, bArray);

System.Diagnostics.ProcessStartInfo process = new System.Diagnostics.ProcessStartInfo(fFile);
System.Diagnostics.Process.Start(process);

Note: please review the attachment also
Comments: I haven't tried this but because it is a formula Epplus does not know what the result will be until you use the Calculate function. Only then could it possibly determine the correct row height.
Viewing all 2262 articles
Browse latest View live


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