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

Created Unassigned: Usage of DisplayNameAttribute in LoadFromCollection prevents localization [15005]

$
0
0
Commit [c23b2198a450] (originating from pull request ["added displaynameattribute support"]) added support for [DisplayNameAttribute] in LoadFromCollection<T> in [ExcelRangeBase.cs].

While this could be useful, DisplayNameAttribute does not support localization of the display name as it must be a compile time constant.

[DisplayAttribute] on the other hand does allow localization through [DisplayAttribute.ResourceType], using this attribute instead of DisplayNameAttribute would provide a greater flexibility.

I can provide a pull request with the fix if you like.

[c23b2198a450]: https://epplus.codeplex.com/SourceControl/changeset/c23b2198a450
["added displaynameattribute support"]: https://epplus.codeplex.com/SourceControl/network/forks/anthonyjshaw/DisplayAttributeHeaderSupport/contribution/6413
[DisplayNameAttribute]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.displaynameattribute.aspx
[ExcelRangeBase.cs]: https://epplus.codeplex.com/SourceControl/latest#EPPlus/ExcelRangeBase.cs
[DisplayAttribute]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.dataannotations.displayattribute.aspx
[DisplayAttribute.ResourceType]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.dataannotations.displayattribute.resourcetype.aspx

Commented Unassigned: Usage of DisplayNameAttribute in LoadFromCollection prevents localization [15005]

$
0
0
Commit [c23b2198a450] (originating from pull request ["added displaynameattribute support"]) added support for [DisplayNameAttribute] in LoadFromCollection<T> in [ExcelRangeBase.cs].

While this could be useful, DisplayNameAttribute does not support localization of the display name as it must be a compile time constant.

[DisplayAttribute] on the other hand does allow localization through [DisplayAttribute.ResourceType], using this attribute instead of DisplayNameAttribute would provide a greater flexibility.

I can provide a pull request with the fix if you like.

[c23b2198a450]: https://epplus.codeplex.com/SourceControl/changeset/c23b2198a450
["added displaynameattribute support"]: https://epplus.codeplex.com/SourceControl/network/forks/anthonyjshaw/DisplayAttributeHeaderSupport/contribution/6413
[DisplayNameAttribute]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.displaynameattribute.aspx
[ExcelRangeBase.cs]: https://epplus.codeplex.com/SourceControl/latest#EPPlus/ExcelRangeBase.cs
[DisplayAttribute]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.dataannotations.displayattribute.aspx
[DisplayAttribute.ResourceType]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.dataannotations.displayattribute.resourcetype.aspx
Comments: Upon creating the fork for the fix I noticed [DisplayAttribute] is available from .NET Framework 4 onward and EPPlus is targeting .NET Framework 3.5 Client Profile. Given that re-targeting EPPlus to the .NET Framework 4 is not a viable solution, do you think there is a workaround to the localization issue? [DisplayAttribute]: http://msdn.microsoft.com/en-gb/library/system.componentmodel.dataannotations.displayattribute.aspx

Commented Issue: Use of System.IO.Packaging is not server-safe [14762]

$
0
0
The BCL System.IO.Packaging uses IsolatedFileStorage when the zipped XLSX file exceeds some specific boundary (I've heard different stories of 1.3MB, 7MB, and 10MB). This presents a variety of issues when running under IIS, whether running under NetworkService or AppPoolIdentity. It's also not thread-safe.

I strongly recommend implementing an alternative packager using a compatible open-source ZIP library such as SharpZipLib or DotNetZip, otherwise people trying to use this to create sizable Excel files server-side are going to have numerous problems, as I've had recently.

As an aside, I'm currently trying out setting the legacyCasMode to True for my IIS application as a workaround, but I don't know yet if this has any effect. It's certainly not ideal.
Comments: Maybe you can replace System.Packaging with NPOI.OpenXml4Net

Created Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!

Created Unassigned: Corrupted file [15012]

$
0
0
Hello, I have this problem: I've made some extractions with epplus. I developed them on my computer in a 3.5 .net vb web app. It's an asynchronous method, so the excel files are saved to a location from where I can get them when they're ready. Now I've just released the web app to a client. This app already existed I just added these extractions. On my computer there's no problem with excel files I produce. I brought my client database to my computer to test with their actual data. Problem is that the same extractions (not all but some of them), done on production environment produce files which excel says are corrupted. When I ask to repair them they're identical to the ones done on my computer, no difference. The only difference is that excel states they're corrupted when done directly on the server.
So I took the two xlsx, the one from the server and the one from my computer. Renamed them to zip, extracted all contents (they're very simple, no formulas, no graph no pivot, just extractions of raw data from a SQL store proc) and compared all files. Surprise: no differences, only ID's contained in workbook.xml.rels, workbook.xml and .rels
No differences in data...
So now I'm really confused... Why is this happening? I was with epplus 2.8 version, but I upgraded to the last one just to be sure and problem is still the same.
Please give me some hint because I really don't understand what's going on...
Last thing to say: my computer runs excel 2013, on the web server there's no excel. I'm opening the produced files with my excel 2013 and a 2007 excel on one computer on the client's network, and when it says the file is corrupted, even my excel 2013 says it is, it doesn't seem a problem in excel version...
Let me know, thank you
Vincenzo

Commented Unassigned: Exception after inserting columns [15010]

$
0
0
Applying this simple diff to the test project, on the beta and on the current HEAD (90cfd9a3a979) reading the column before and after inserting, causes this exception on trying to access the newly created column:
```
Test method EPPlusTest.WorkSheetTest.RunWorksheetTests threw exception:
System.Exception: ColumnMax can not span over existing column 1.
at OfficeOpenXml.ExcelColumn.set_ColumnMax(Int32 value) in ExcelColumn.cs: line 90
at OfficeOpenXml.ExcelWorksheet.CopyColumn(ExcelColumn c, Int32 col, Int32 maxCol) in ExcelWorksheet.cs: line 1499
at OfficeOpenXml.ExcelWorksheet.Column(Int32 col) in ExcelWorksheet.cs: line 1466
at EPPlusTest.WorkSheetTest.InsertDeleteTestColumns() in WorkSheet.cs: line 421
at EPPlusTest.WorkSheetTest.RunWorksheetTests() in WorkSheet.cs: line 26
```

```
diff --git a/EPPlusTest/WorkSheet.cs b/EPPlusTest/WorkSheet.cs
index 5fb4938..2eec6c8 100644
--- a/EPPlusTest/WorkSheet.cs
+++ b/EPPlusTest/WorkSheet.cs
@@ -411,8 +411,15 @@ public void InsertDeleteTestColumns()
Assert.AreEqual(((object[,])ws.Cells["A1:C5"].Value)[1, 1], 1);
ws.Cells["A1:B3"].Merge = true;
ws.Cells["D3"].Formula = "A2+C5";
+
+ // Read column one before inserting
+ var colOriginal = ws.Column(1);
+
ws.InsertColumn(1, 1);

+ // Access the new column 1
+ var colNew = ws.Column(1);
+
ws.Cells["K10:M15"].Value = 1;
ws.Cells["K11:L13"].Merge = true;
ws.DeleteColumn(12, 1);
```


I've hit this in a production project so any intermediate advice to tweak it would be greatly welcomed!
Comments: I've developed a patch that appears to fix the problem, at least in my use cases. It's a bit brute force, but is attached, for reference. 1. I re-assign the column max and mins for all columns where these are the same 2. I handle the case where PrevCell returns a cell covering a range higher than that of the column (previously, only the maximum edge of the column definition was tested)

Commented Unassigned: Exception after inserting columns [15010]

$
0
0
Applying this simple diff to the test project, on the beta and on the current HEAD (90cfd9a3a979) reading the column before and after inserting, causes this exception on trying to access the newly created column:
```
Test method EPPlusTest.WorkSheetTest.RunWorksheetTests threw exception:
System.Exception: ColumnMax can not span over existing column 1.
at OfficeOpenXml.ExcelColumn.set_ColumnMax(Int32 value) in ExcelColumn.cs: line 90
at OfficeOpenXml.ExcelWorksheet.CopyColumn(ExcelColumn c, Int32 col, Int32 maxCol) in ExcelWorksheet.cs: line 1499
at OfficeOpenXml.ExcelWorksheet.Column(Int32 col) in ExcelWorksheet.cs: line 1466
at EPPlusTest.WorkSheetTest.InsertDeleteTestColumns() in WorkSheet.cs: line 421
at EPPlusTest.WorkSheetTest.RunWorksheetTests() in WorkSheet.cs: line 26
```

```
diff --git a/EPPlusTest/WorkSheet.cs b/EPPlusTest/WorkSheet.cs
index 5fb4938..2eec6c8 100644
--- a/EPPlusTest/WorkSheet.cs
+++ b/EPPlusTest/WorkSheet.cs
@@ -411,8 +411,15 @@ public void InsertDeleteTestColumns()
Assert.AreEqual(((object[,])ws.Cells["A1:C5"].Value)[1, 1], 1);
ws.Cells["A1:B3"].Merge = true;
ws.Cells["D3"].Formula = "A2+C5";
+
+ // Read column one before inserting
+ var colOriginal = ws.Column(1);
+
ws.InsertColumn(1, 1);

+ // Access the new column 1
+ var colNew = ws.Column(1);
+
ws.Cells["K10:M15"].Value = 1;
ws.Cells["K11:L13"].Merge = true;
ws.DeleteColumn(12, 1);
```


I've hit this in a production project so any intermediate advice to tweak it would be greatly welcomed!
Comments: Seems like it might be a duplicate of https://epplus.codeplex.com/workitem/14977

Commented 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
Comments: Did you work out how to get around this? I've also been seeing this error in [this bug](https://epplus.codeplex.com/workitem/15010)

Commented Unassigned: Corrupted file [15012]

$
0
0
Hello, I have this problem: I've made some extractions with epplus. I developed them on my computer in a 3.5 .net vb web app. It's an asynchronous method, so the excel files are saved to a location from where I can get them when they're ready. Now I've just released the web app to a client. This app already existed I just added these extractions. On my computer there's no problem with excel files I produce. I brought my client database to my computer to test with their actual data. Problem is that the same extractions (not all but some of them), done on production environment produce files which excel says are corrupted. When I ask to repair them they're identical to the ones done on my computer, no difference. The only difference is that excel states they're corrupted when done directly on the server.
So I took the two xlsx, the one from the server and the one from my computer. Renamed them to zip, extracted all contents (they're very simple, no formulas, no graph no pivot, just extractions of raw data from a SQL store proc) and compared all files. Surprise: no differences, only ID's contained in workbook.xml.rels, workbook.xml and .rels
No differences in data...
So now I'm really confused... Why is this happening? I was with epplus 2.8 version, but I upgraded to the last one just to be sure and problem is still the same.
Please give me some hint because I really don't understand what's going on...
Last thing to say: my computer runs excel 2013, on the web server there's no excel. I'm opening the produced files with my excel 2013 and a 2007 excel on one computer on the client's network, and when it says the file is corrupted, even my excel 2013 says it is, it doesn't seem a problem in excel version...
Let me know, thank you
Vincenzo
Comments: This is a bit of a shot in the dark, and others might have better ideas, but --- Is a different version of the .NET Framework installed in the production environment versus your development/testing environment? For example, perhaps some strange behavior in System.IO.Packaging (which EPPlus uses, at least until v4 now) was fixed (or introduced?) between .NET 3.5 and .NET 4.0. So if you've got 4.0 on dev and 3.5 on prd (or vice versa), you might see some strange discrepancy like this. Again, just a shot in the dark. Hope this helps.

Commented Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!
Comments: It looks like you were given an executable assembly built against EPPlus 4 (which is currently in beta). Try downloading EPPlus 4, unzipping the archive, and placing the DLL in the same folder as your executable. Then re-run your executable. The page for the current EPPlus 4: https://epplus.codeplex.com/releases/view/118053 The direct link to the zip file: https://epplus.codeplex.com/downloads/get/813458

Commented Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!
Comments: I downloaded [EPPlus 4.0 Beta 2](https://epplus.codeplex.com/downloads/get/813458) and put __EPPlus.dll__ in the same folder as my executable. Attempt to launch application results in the following warning: ![Image](http://s018.radikal.ru/i525/1405/a1/7777206d4fc8.png) See also attached log. It seems that current version of __EPPlus.dll__ has version __4.0.0.1__, but not __4.0.0.0__ as required by the application: ![Image](http://s56.radikal.ru/i152/1405/cc/41751368d941.png) Can you share __EPPlus.dll__ has version __4.0.0.0__ please?

Commented Unassigned: Corrupted file [15012]

$
0
0
Hello, I have this problem: I've made some extractions with epplus. I developed them on my computer in a 3.5 .net vb web app. It's an asynchronous method, so the excel files are saved to a location from where I can get them when they're ready. Now I've just released the web app to a client. This app already existed I just added these extractions. On my computer there's no problem with excel files I produce. I brought my client database to my computer to test with their actual data. Problem is that the same extractions (not all but some of them), done on production environment produce files which excel says are corrupted. When I ask to repair them they're identical to the ones done on my computer, no difference. The only difference is that excel states they're corrupted when done directly on the server.
So I took the two xlsx, the one from the server and the one from my computer. Renamed them to zip, extracted all contents (they're very simple, no formulas, no graph no pivot, just extractions of raw data from a SQL store proc) and compared all files. Surprise: no differences, only ID's contained in workbook.xml.rels, workbook.xml and .rels
No differences in data...
So now I'm really confused... Why is this happening? I was with epplus 2.8 version, but I upgraded to the last one just to be sure and problem is still the same.
Please give me some hint because I really don't understand what's going on...
Last thing to say: my computer runs excel 2013, on the web server there's no excel. I'm opening the produced files with my excel 2013 and a 2007 excel on one computer on the client's network, and when it says the file is corrupted, even my excel 2013 says it is, it doesn't seem a problem in excel version...
Let me know, thank you
Vincenzo
Comments: Thanks for your shots :-) On my computer I've installed .Net 3.5 and 4 but still the development of this project runs under 3.5 on both machines... Don't know if the fact that framework 4 is installed can have an impact even if the application isn't using it

Commented Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!
Comments: I don't think the 4.0.0.0 DLL is directly available for download, but I think it might be built from this March 13 changeset: https://epplus.codeplex.com/SourceControl/changeset/746c1f2edead I'd try building it and attaching it here for you to give it a try, but I don't have access right now to a machine that might build it.

Commented Unassigned: Corrupted file [15012]

$
0
0
Hello, I have this problem: I've made some extractions with epplus. I developed them on my computer in a 3.5 .net vb web app. It's an asynchronous method, so the excel files are saved to a location from where I can get them when they're ready. Now I've just released the web app to a client. This app already existed I just added these extractions. On my computer there's no problem with excel files I produce. I brought my client database to my computer to test with their actual data. Problem is that the same extractions (not all but some of them), done on production environment produce files which excel says are corrupted. When I ask to repair them they're identical to the ones done on my computer, no difference. The only difference is that excel states they're corrupted when done directly on the server.
So I took the two xlsx, the one from the server and the one from my computer. Renamed them to zip, extracted all contents (they're very simple, no formulas, no graph no pivot, just extractions of raw data from a SQL store proc) and compared all files. Surprise: no differences, only ID's contained in workbook.xml.rels, workbook.xml and .rels
No differences in data...
So now I'm really confused... Why is this happening? I was with epplus 2.8 version, but I upgraded to the last one just to be sure and problem is still the same.
Please give me some hint because I really don't understand what's going on...
Last thing to say: my computer runs excel 2013, on the web server there's no excel. I'm opening the produced files with my excel 2013 and a 2007 excel on one computer on the client's network, and when it says the file is corrupted, even my excel 2013 says it is, it doesn't seem a problem in excel version...
Let me know, thank you
Vincenzo
Comments: [I might be inferring the wrong way here; apologies in advance & please ignore the following if you're already totally sure that the application runs on exactly the same Framework version in both environments.] [This MSDN article](http://msdn.microsoft.com/en-us/library/jj152935(v=vs.110).aspx) seems to have some useful bits in it about what Framework version an app uses based on three things: the app's configuration file, the presence of the Framework the app was built against, and the latest* Framework version available on the system. [* some important qualifications about "latest" at the article] To be sure of what Framework version your app actually ends up using, I think checking Environment.Version at runtime would suffice.

Commented Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!
Comments: I would greatly appreciate if you could build it. Thank you!

Created Unassigned: Retrieving indent levels [15013]

$
0
0
4.0 Beta 2
When using styles.indent to find out the indentation of a cell on a spreadsheet if the indentation is actually 0 then the value returned by styles.indent is the minimum int32 (–2147483648)

Created Unassigned: 4.0 Beta 2: Not retreiving the correct style name [15014]

$
0
0
In the attached Spreadsheet I need to get the stylename of sheet "Fixed Assets Schedule" cell B5.
The actual style name as seen in excel is "SFFSectionHeading00" but EPPlus reads it as "NormalWrappedText"

fixedAssetsSheet.Cells(5, 2).StyleName

Is there a workaround? This is a critical error for me!

Thanks,
Sara

Commented Issue: ExcelRangeBase.LoadFromText doesn't read empty string correctly [14677]

$
0
0
I've noticed that when reading from a CSV file to a worksheet using the LoadFromText method, the values of cells that should contain an empty string are set to the string qualifier. For example, is the text qualifier is a double quote, the value "" in the CSV becomes " in the worksheet. I've already submitted a quick fix on the fork at : https://hg.codeplex.com/forks/patrick1/csvreadfix, but the unit test I added is very basic and doesn't really conform to any standard. I couldn't find any other tests for this method, so I don't know if this had any side-effects that I'm not seeing.

All I did was remove both occurences of the lines :

if (QCount > 1)
{
v += new string(Format.TextQualifier, QCount / 2);
}
I'm not sure what these were meant to do.

Can someone please have a look at this issue an see if this fix works?

Comments: even though it's not explicitly stated, a <""> is the escaped version of <"> for csv, so your csv file is invalid, an empty string should be just nothing.

Created Unassigned: ExcelRange LoadFromText issue with multiline cell value [15015]

$
0
0
When loading a csv file to a worksheet, if any one cell value in csv is multiline, and happens to use the same EOL character, an error will be thrown.

This is happening because of the split by EOL character.

Attached file for test, second line contains a EOL character in the first value. LoadFromText will split the second line, and be unable to process it.

Commented Unassigned: Could not load file or assembly EPPlus, Version=4.0.0.0 [15011]

$
0
0
Greetings!

I try to run an executable, but get the following error:

![Image](http://s57.radikal.ru/i158/1405/ce/cf1986c81d73.png)

What is missing and how can I fix it without source code?

Thank you!
Comments: I've attached a build, you can try it and see what happens. If you still see problems, it'd be best to contact whoever provided you with the executable and ask them to give you a copy of the EPPlus DLL that they actually used to build it.
Viewing all 2262 articles
Browse latest View live


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