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

Edited Unassigned: Collapsed columns are shown when copying worksheet [14969]

$
0
0
When copying worksheet with collapsed column, in the copy the column is not collapsed.
Example attached.

Commented Unassigned: Collapsed columns are shown when copying worksheet [14969]

$
0
0
When copying worksheet with collapsed column, in the copy the column is not collapsed.
Example attached.
Comments: Try 4.0 Beta 2

Created Unassigned: Incorrect builtin numberformat [14976]

$
0
0
Hi,

The number format with the NumFmtId = 40 has an incorrect negative value. It is rounding the value to the whole digits.
The format should be "#,##0.00;\[Red\](#,##0.00)") instead of "#,##0.00;\[Red\](#,##)"

It needs to be fixed on the following files:
EPPlus\Style\XmlAccess\ExcelNumberFormatXml.cs Line:162
EPPlus\Style\ExcelNumberFormat.cs Line:147 and Line:211

Cheers

Created Unassigned: InsertColumn at position 1 not working - Beta 4.0 release 2 [14977]

$
0
0
Hi

I am trying to insert one column at position 1. However this throws exception "ColumnMax can not span over existing column 2."

Following is the code for the same
public static string RunSample0( DirectoryInfo outputDir )
{
FileInfo newFile = new FileInfo( outputDir.FullName + @"\sample0.xlsx" );
if ( !newFile.Exists )
{
return null;
}
using ( ExcelPackage package = new ExcelPackage( newFile ) )
{
ExcelWorksheet worksheet = package.Workbook.Worksheets[1];
worksheet.InsertColumn( 1, 1 );

ExcelColumn entireColumn = worksheet.Column( 1 );

// save our new workbook and we are done!
package.Save();

}

return newFile.FullName;
}

This is applicable to any excel file, but attaching the one that I have used for this example. This throws an exception when you try to access the new column that was added at line
ExcelColumn entireColumn = worksheet.Column( 1 );

~Sanket

Commented Unassigned: XYScatterSmooth Chart Error [14975]

$
0
0
I have a XYScatterSmooth chart in an Excel file (XLSX).
I insert the chart data in some cells by code behind and the save a file.
When I open the file, the chart's lines are not Smooth.
Any idea?
Comments: In attachment there is a example source file. If i set values on column A,B,C by code-behind then the graph type change!

Created Unassigned: EPPlus 4.0 [14978]

$
0
0
I have to write in a template Excel. This template has some controls like Radio Buttons, Checks Boxes, etc.

When I populate the template with the version 3.1.3.0 is works perfectly well. When I added the version 4 to calculate the values of the formulas, the text of each Text Box and Check box is displayed incorrectly. The text is overlapped.

Can you help me with this issue?

Edited Unassigned: EPPlus 4.0 [14978]

$
0
0
I have to write in a template Excel. This template has some controls like Radio Buttons, Checks Boxes, etc.

When I populate the template with the version 3.1.3.0 is works perfectly well. When I added the version 4 to calculate the values of the formulas, the text of each Text Box and Check box is displayed incorrectly. The text is overlapped.

Can you help me with this issue?

Edited Unassigned: EPPlus 4.0 - Text is overlapped. [14978]

$
0
0
I have to write in a template Excel file. This template has some controls like Radio Buttons, Checks Boxes, etc.

When I populate the template with the version 3.1.3.0 it works perfectly well. When I added the version 4 to calculate the values of the formulas, the text of each Text Box and Check box is displayed incorrectly. The text is overlapped.

Can you help me with this issue?

Commented Unassigned: EPPlus 4.0 is not thread safe [14973]

$
0
0
Hi

I am trying to use EPPlus in a multi-threaded environment accessing the same file in different threads.

Following is how we use this
1. Open the file in one thread
2. Read data (different rows) in 10 differnet thread
3. We use a write lock when ever a write call is made
4. Close and save file in the only one thread

The problem we have is that in the read, we get an exception
ColumnMax can not span over existing column <number>

The number that we get is different always.

Regards,
Sanket Pattekar




Comments: Hi Mats/Jan I have tested my code with the beta 2 release and is still not able to use EPPlus in a multi-threaded environment. The problem happens when I am trying to set the style for the cell. Attaching my code and also the excel file that I am using. Awaiting your response as this is now on a critical path in our project. Do let me know if you need any more information. ~Sanket

Created Unassigned: NullReferenceException in ExcelWorkbook.Dispose() [14979]

$
0
0
A NullReferenceException occurs in some cases when disposing ExcelWorkbook.
A check is missing when disposing ExcelWorkbook.

In: ExcelWorkbook.cs, method Dispose, should be:
```

public void Dispose()
{
...
if (_worksheets != null)
{
_worksheets.Dispose();
_worksheets = null;
}
...

```

A similar issue is marked as solved:
https://epplus.codeplex.com/workitem/14737

Commented Unassigned: XYScatterSmooth Chart Error [14975]

$
0
0
I have a XYScatterSmooth chart in an Excel file (XLSX).
I insert the chart data in some cells by code behind and the save a file.
When I open the file, the chart's lines are not Smooth.
Any idea?
Comments: Hi, I will respond to your private message here. I am unfortunately not familiar with this part of EPPlus and can not help you with this issue. Hopefully one of the other devs will find the time to take a look. /Mats

Commented Unassigned: Collapsed columns are shown when copying worksheet [14969]

$
0
0
When copying worksheet with collapsed column, in the copy the column is not collapsed.
Example attached.
Comments: Works well in 4.0 Beta 2.

Commented Unassigned: Error copying cell styles when copying worksheet to another workbook [14959]

$
0
0
Cell styles are corrupted when copying worksheet to another workbook if the worksheet being copied contains cells with different styles but the same custom number format.

Example attached.

Comments: The same with 4.0 Beta 2.

Created Unassigned: SaveAs doesn't Release File [14980]

$
0
0
Hello,
i use this library in a web application to generate files for the user to download, the Data amount for these Files can be rather big so i fill one file to the maximum row count and then generate the next for the remaining data and so on. After all files have been written using the SaveAs(FileStream) method i package them into a Zip file. When trying to read from the last generated File, the application encounters the following error message:

System.IO.IOException: The process cannot access the file 'Test1-3.xlsx' because it is being used by another process.

Created Unassigned: Styles are not saved for cells without a value [14981]

$
0
0
In EPPlus 3.1, even if a cell did not have a value, the styles for the cell could be set.

However, in EPPlus 4 beta, the styles are not persisted.

The following code demonstrates the difference in versions 3.1 and 4.0:

```
var filename = Path.Combine(Path.GetTempPath(), "test.xlsx");

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

using(var ep = new ExcelPackage(new FileInfo(filename)))
{
var workbook = ep.Workbook;

var style = workbook.Styles.CreateNamedStyle("test");
style.Style.Fill.PatternType = ExcelFillStyle.Solid;
style.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(79, 129, 189));
style.Style.Border.Bottom.Style = ExcelBorderStyle.Thick;

var worksheet = workbook.Worksheets.Add("Sheet1");

worksheet.Column(1).Width = 50;

worksheet.Cells["A1"].Value = "Where no values have been set";
worksheet.Cells["A3"].Value = "Where the first value is set";
worksheet.Cells["A5"].Value = "Where all values are set";
worksheet.Cells["A7"].Value = "Where the first value is set and the cells merged";

worksheet.Cells[1, 2, 1, 4].StyleName = "test";

worksheet.Cells[3, 2].Value = String.Empty;
worksheet.Cells[3, 2, 3, 4].StyleName = "test";

worksheet.Cells[5, 2, 5, 4].Value = String.Empty;
worksheet.Cells[5, 2, 5, 4].StyleName = "test";

worksheet.Cells[7, 2].Value = String.Empty;
worksheet.Cells[7, 2, 7, 4].StyleName = "test";
worksheet.Cells[7, 2, 7, 4].Merge = true;

ep.Save();
}

Process.Start(filename);
```

test.xlsx attached is the output from version 4. From version 3.1, all four rows look the same.

Commented Unassigned: Styles are not saved for cells without a value [14981]

$
0
0
In EPPlus 3.1, even if a cell did not have a value, the styles for the cell could be set.

However, in EPPlus 4 beta, the styles are not persisted.

The following code demonstrates the difference in versions 3.1 and 4.0:

```
var filename = Path.Combine(Path.GetTempPath(), "test.xlsx");

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

using(var ep = new ExcelPackage(new FileInfo(filename)))
{
var workbook = ep.Workbook;

var style = workbook.Styles.CreateNamedStyle("test");
style.Style.Fill.PatternType = ExcelFillStyle.Solid;
style.Style.Fill.BackgroundColor.SetColor(Color.FromArgb(79, 129, 189));
style.Style.Border.Bottom.Style = ExcelBorderStyle.Thick;

var worksheet = workbook.Worksheets.Add("Sheet1");

worksheet.Column(1).Width = 50;

worksheet.Cells["A1"].Value = "Where no values have been set";
worksheet.Cells["A3"].Value = "Where the first value is set";
worksheet.Cells["A5"].Value = "Where all values are set";
worksheet.Cells["A7"].Value = "Where the first value is set and the cells merged";

worksheet.Cells[1, 2, 1, 4].StyleName = "test";

worksheet.Cells[3, 2].Value = String.Empty;
worksheet.Cells[3, 2, 3, 4].StyleName = "test";

worksheet.Cells[5, 2, 5, 4].Value = String.Empty;
worksheet.Cells[5, 2, 5, 4].StyleName = "test";

worksheet.Cells[7, 2].Value = String.Empty;
worksheet.Cells[7, 2, 7, 4].StyleName = "test";
worksheet.Cells[7, 2, 7, 4].Merge = true;

ep.Save();
}

Process.Start(filename);
```

test.xlsx attached is the output from version 4. From version 3.1, all four rows look the same.
Comments: ![Image](http://imgur.com/cKp7gpH.jpg)

Created Unassigned: ambiguous class Ionic.Zip.BadPasswordException [14982]

$
0
0
When i use Ionic.Zip in my project, together with EPPlus i get ambiguous class error for Ionic.Zip.BadPasswordException class.

I managed to solve the issue, by renaming the BadPasswordException class of EPPlus project in
Packaging -> DotNetZip -> Zlib -> Exceptions.cs.





Created Unassigned: Thread safety issue creating worksheets [14983]

$
0
0
It seems one needs to lock around anything that creates a new worksheet. chart, or anything else that generates a new file in the xlsx zip archive.

At this stage in the game would you accept a patch that puts a lock around the inside of Add/AddSheet and anywhere else necessary?

I think in a future version the lock could be made tightly around just GetSheetURI() and CreatePart() if a separate dictionary of WorkSheetId->WorkSheet is maintained in that lock. That would prevent WorkSheetId race conditions.

Created Unassigned: Conditional Formating saves german numbers with coma instead of a point into XML [14984]

$
0
0
There is a small bug within the conditional formating which prevents the use of decimal values on an german windows.

When I tried to set the number value for a CF to decimal value I got an corrupt worksheet because the value was saved as "1,39" instead of "1.39".

```
ExcelAddress rangeAddress = new ExcelAddress(scoreRange.Address);
var rule = worksheet.ConditionalFormatting.AddThreeColorScale(rangeAddress);

rule.LowValue.Type = eExcelConditionalFormattingValueObjectType.Num;
rule.LowValue.Value = 1.39;
rule.LowValue.Color = Color.Red;
```

I'm not sure if this will fix the problem in all possible cases but this fixed the problem for me:

_ExcelConditionalFormattingColorScaleValue.cs (before)_
```
/// <summary>
/// Get/Set the 'cfvo' node @val attribute
/// </summary>
public Double Value
{
...
valueToStore = value.ToString();
...
}
```

_ExcelConditionalFormattingColorScaleValue.cs (after)_
```
/// <summary>
/// Get/Set the 'cfvo' node @val attribute
/// </summary>
public Double Value
{
...
valueToStore = value.ToString(CultureInfo.InvariantCulture.NumberFormat);
...
}
```

Created Unassigned: LoadFromDataTable with empty Table and PrintHeaders false gives ArgumentException or ArgumentOutOfRangeException [14985]

$
0
0
I'm using 3.1.3.3.

```
using System;
using System.Data;
using OfficeOpenXml;

namespace Test
{
class Program
{
static void Main(string[] args)
{
var ep = new ExcelPackage();
var sheet = ep.Workbook.Worksheets.Add("Test");

// Make an empty table
var dt = new DataTable();
dt.Columns.Add(new DataColumn("col1"));
dt.Columns.Add(new DataColumn("col2"));

// Load empty table at A1
try
{
sheet.Cells["A1"].LoadFromDataTable(dt, false);
}
catch (ArgumentException e)
{
Console.WriteLine(e);
Console.WriteLine();
}

// Load empty table at A2
try
{
sheet.Cells["A2"].LoadFromDataTable(dt, false);
}
catch (ArgumentOutOfRangeException e)
{
Console.WriteLine(e);
Console.WriteLine();
}

Console.WriteLine("Press any key ...");
Console.ReadKey();
}
}
}
```

Output:

```
System.ArgumentException: Row out of range
at OfficeOpenXml.ExcelRange.ValidateRowCol(Int32 Row, Int32 Col)
at OfficeOpenXml.ExcelRange.get_Item(Int32 FromRow, Int32 FromCol, Int32 ToRo
w, Int32 ToCol)
at OfficeOpenXml.ExcelRangeBase.LoadFromDataTable(DataTable Table, Boolean Pr
intHeaders)

System.ArgumentOutOfRangeException: Specified argument was out of the range of v
alid 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(Int32 FromRow, Int32 FromCol, Int32 ToRo
w, Int32 ToCol)
at OfficeOpenXml.ExcelRangeBase.LoadFromDataTable(DataTable Table, Boolean Pr
intHeaders)
```
Viewing all 2262 articles
Browse latest View live


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