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

Edited Unassigned: Worksheet Formatting Corruption [14927]

$
0
0
I am hitting an issue where the Worksheet formatting is being corrupted after I open, make a small change, then re-save a sheet.

Here is the example code:

```
public static void TestExcelOutput()
{
var path =
@"C:\Users\bill\Documents\Visual Studio 2010\Projects\EPPlusTest\EPPlusTest\Input.xlsx";
var inputFileInfo = new FileInfo(path);

var outputPath = Path.Combine(Path.GetDirectoryName(path), string.Format("{0}{1}.{2}", Path.GetFileNameWithoutExtension(path),
"-processed", Path.GetExtension(path)));
var outputFileInfo = new FileInfo(outputPath);

using (var package = new ExcelPackage(inputFileInfo))
{
foreach (var worksheet in package.Workbook.Worksheets)
{
worksheet.SetValue(1, 1, "foo");
}
package.SaveAs(outputFileInfo);
}

}
```
For me, after re-saving, some of the cell borders in the Analyst tab are lost.

Created Unassigned: Size of Comment Window [14928]

$
0
0
Hello

I create a cell comment with no problem. My comment is 150 characters but the window that it displays in is not large enough to display all 150 characters. Is there in programatic way to control the comment window size?

var cell = sheet.Cells[16, 5];
cell.AddComment(
"Calculated by multiplying the employee rate times the count" +
" of unfavorable variances for facility(s) divided by 10." +
" (On average takes 1 hr to research and resolve 10 lines)",
"Comment Title");

Commented Unassigned: Unable to create mutex. (Exception from HRESULT: 0x80131464) [14877]

$
0
0
[IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464)]
System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName) +0
System.IO.IsolatedStorage.IsolatedStorageFile.Lock(Boolean& locked) +370
System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, IsolatedStorageFile isf) +468
System.IO.IsolatedStorage.IsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, IsolatedStorageFile isf) +35
MS.Internal.IO.Packaging.SafeIsolatedStorageFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, ReliableIsolatedStorageFileFolder folder) +102
MS.Internal.IO.Packaging.PackagingUtilities.CreateUserScopedIsolatedStorageFileStreamWithRandomName(Int32 retryCount, String& fileName) +276
MS.Internal.IO.Packaging.SparseMemoryStream.EnsureIsolatedStoreStream() +31
MS.Internal.IO.Packaging.SparseMemoryStream.SwitchModeIfNecessary() +400
MS.Internal.IO.Packaging.CompressEmulationStream.Write(Byte[] buffer, Int32 offset, Int32 count) +76
MS.Internal.IO.Packaging.CompressStream.Write(Byte[] buffer, Int32 offset, Int32 count) +431
MS.Internal.IO.Zip.ProgressiveCrcCalculatingStream.Write(Byte[] buffer, Int32 offset, Int32 count) +177
MS.Internal.IO.Zip.ZipIOModeEnforcingStream.Write(Byte[] buffer, Int32 offset, Int32 count) +130
System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder) +233
System.IO.StreamWriter.Write(String value) +147
OfficeOpenXml.ExcelWorksheet.UpdateRowCellData(StreamWriter sw) +3672
OfficeOpenXml.ExcelWorksheet.SaveXml() +554
OfficeOpenXml.ExcelWorksheet.Save() +280
OfficeOpenXml.ExcelWorkbook.Save() +651
OfficeOpenXml.ExcelPackage.Save() +67
Comments: Any updates on this?

Created Unassigned: Deleting and recreating worksheets causes crash. [14929]

$
0
0
If you create a worksheet by name and then rename it you cannot then delete it by name.

Similarly if you create a worksheet by name then delete it you cannot create another one with the same name.

Error given is System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary. at System.Collections.Generic.Dictionary`2.get_Item(TKey key) at OfficeOpenXml.ExcelWorksheets.get_Item(Int32 PositionID) at OfficeOpenXml.ExcelWorksheets.Delete(Int32 Index) at OfficeOpenXml.ExcelWorksheets.Delete(String name)

This fails if you pass the index, object or name as the parameter.

Annoyingly it doesn't fail every time either!

Here is an example file and code you can run to reproduce the issue:

```

ExcelPackage excelPackage = new ExcelPackage(inputStream); //FROM EXAMPLE FILE

//Workaround for creation issue, this code block works fine
ExcelWorksheet lookupWs = excelPackage.Workbook.Worksheets.Add("tmppoiuy");
if (excelPackage.Workbook.Worksheets["Lookups"] != null) excelPackage.Workbook.Worksheets.Delete(excelPackage.Workbook.Worksheets["Lookups"].Index);
lookupWs.Name = LookupWorksheetName;
excelPackage.Workbook.Worksheets.MoveToStart(Lookups);

//Same code, different worksheet. This causes crash.
ExcelWorksheet reporter = excelPackage.Workbook.Worksheets.Add("tmpQWERTY");
if (excelPackage.Workbook.Worksheets["ImportLog"] != null) excelPackage.Workbook.Worksheets.Delete(excelPackage.Workbook.Worksheets["ImportLog"].Index);
reporter.Name = ReporterWorksheetName;
excelPackage.Workbook.Worksheets.MoveToStart("ImportLog");
```

Created Unassigned: Display the first row field field name in a pivot table [14930]

$
0
0
I am trying to create pivot tables with EPPlus. I got the formatting the way I want, tabular rows labels.

However, I want to get rid of the drop down filter "Row labels" and replace it with the name of the first field. I know I can set the PivotTable.RowHeaderCaption property, but that will not be updated if the user edits the pivot table after my code generates it. How do I not display the RowHeaderCaption with the filter?

I have made a [sample](https://gist.github.com/zippy1981/ddd4e0fd7766e639c8e8) that pulls data from NYC open data. That creates a pivot table illustrating the problem.

Edited Unassigned: Display the first row field field name in a pivot table [14930]

$
0
0
I am trying to create pivot tables with EPPlus. I got the formatting the way I want, tabular rows labels.

However, I want to get rid of the drop down filter "Row labels" and replace it with the name of the first field. I know I can set the PivotTable.RowHeaderCaption property, but that will not be updated if the user edits the pivot table after my code generates it. How do I not display the RowHeaderCaption with the filter?

I have made a [sample](https://gist.github.com/zippy1981/ddd4e0fd7766e639c8e8) that pulls data from NYC open data. That creates a pivot table illustrating the problem.

Commented Unassigned: Display the first row field field name in a pivot table [14930]

$
0
0
I am trying to create pivot tables with EPPlus. I got the formatting the way I want, tabular rows labels.

However, I want to get rid of the drop down filter "Row labels" and replace it with the name of the first field. I know I can set the PivotTable.RowHeaderCaption property, but that will not be updated if the user edits the pivot table after my code generates it. How do I not display the RowHeaderCaption with the filter?

I have made a [sample](https://gist.github.com/zippy1981/ddd4e0fd7766e639c8e8) that pulls data from NYC open data. That creates a pivot table illustrating the problem.
Comments: Please close this. I realize it that it belongs in discussions.

Created Unassigned: Unreadable content after opening/saving the Excel file by EPPlus [14931]

$
0
0
I have an Excel file containing a TreeList. Then I just open and save the Excel file without doing any other thing.

using (var excel = new ExcelPackage(existingFile))
{
excel.Save();
}

The output Excel file contains unreadable content and a Repair dialog appears to tell me about removing a part ("Removed Part: Drawing shape")

Please help me.

Thanks,
Vu

Edited Unassigned: Unreadable content after opening/saving the Excel file by EPPlus [14931]

$
0
0
I have an Excel file containing a TreeList. Then I just open and save the Excel file without doing any other thing.

```
using (var excel = new ExcelPackage(existingFile))
{
excel.Save();
}
```

The output Excel file contains unreadable content and a Repair dialog appears to tell me about removing a part ("Removed Part: Drawing shape")

Please help me.

Thanks,
Vu

Created Unassigned: Getting value from merged cells [14932]

$
0
0
How to get value from merged cells, if I only knows one of the cells in the merged range and I do not know the start and end of the range?

I've tried cell.value (which will return null as it is not the first cell of the range). I've also tried to find the merged range from the cell I got but failed.

Created Unassigned: Minor Issue with AutoFitColumns() [14933]

$
0
0
AutoFitColumns() does not take the presence of auto filters into consideration when determining the width of the column. Thus, the columns end up being slightly too narrow to accommodate the extra space consumed by the filter button. (Please refer to the attached image.)

Many thanks for this marvelous library.

Created Unassigned: Sharepoint is 64 bit. Can i use this for sharepoint project. ???? [14934]

$
0
0
Sharepoint is 64 bit. Can i use this for sharepoint project. ????

Created Unassigned: Support for missing "r" attribute on [14935]

$
0
0
Hi,

EPPlus currently (Version 3.1.3) causes a NullReferenceException at ExcelCellBase.GetRowCol when loading a worksheet where cells are missing an explicitly specified reference. [Omitting the "r" attribute is perfectly legal.](http://msdn.microsoft.com/en-us/library/ff530310(v=office.12).aspx)
Excel does not generate such files, SpreadsheetGear however does. A testcase is attached.

Created Unassigned: Not working with OfficeSuite [14936]

$
0
0
Hello,

The Excel file is only working on Microsoft Excel on Windows and Windows Phone but it is not working on OfficeSuite 7 on Android and on Polaris Viewer 4.1 on Android also.

Is there a solution to make them working on Android and IPhone ?

Created Unassigned: Invalid column data when styling column using zero-index [14937]

$
0
0
I ran the following code (on accident), and it did not error but it did produce invalid column data which Excel 2013 complained about (emphasis on Column(0) reference):
```
var summary = excel.Workbook.Worksheets.Add("Summary");
excel.Workbook.Worksheets.MoveBefore(summary.Index, 1);
summary.Column(0).Style.Font.Bold = true;
```


Created Unassigned: DefaultColWidth not working? [14938]

$
0
0
First of all great software. Thanks for you work.

I am trying to create a uniform width and height for all cells. I have this code:

```
ExcelPackage epck = new ExcelPackage();
var ws = epck.Workbook.Worksheets.Add("Sheet 1");
ws.DefaultColWidth = .5;
ws.DefaultRowHeight = 4;
```

and its not working, well column width is not working.

Is there anything that I missed here?

Thanks,
Junji

Created Unassigned: vba project can not open after saved a worksheet with chinese name [14939]

$
0
0
create a sheet with chinese name ,and save it with a vba project , the vba of the generated file will not work ,and can not open by office

if create a sheet with english name , it will work

so please solve the bug.


```
using System.Text;
using OfficeOpenXml;
using System.IO;

namespace ExcelVBATest
{
class Program
{
static void Main(string[] args)
{
string path = @"D:\1.xlsm";
var file = new FileInfo(path);
if (file.Exists)
{
file.Delete();
file = new FileInfo(path);
}

using (var package = new ExcelPackage(file))
{
//ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("Test");
ExcelWorksheet worksheet = package.Workbook.Worksheets.Add("测试");

package.Workbook.CreateVBAProject();
var sb = new StringBuilder();
sb.AppendLine("Sub GetData()");
sb.AppendLine("MsgBox (\"Hello,World\")");
sb.AppendLine("End Sub");
var module = package.Workbook.VbaProject.Modules.AddModule("aa");
module.Code = sb.ToString();

var stringBuilder = new StringBuilder();
stringBuilder.AppendLine("Private Sub Worksheet_Change(ByVal Target As Range)");
stringBuilder.AppendLine("GetData");
stringBuilder.AppendLine("End Sub");
worksheet.CodeModule.Code = stringBuilder.ToString();

package.Save();
}
}
}
}

```

Created Unassigned: I can not able to add EPPlus reference in my WPF Appliocatins [14940]

$
0
0
The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "EPPlus" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project.


This is the error message am getting.Please some one help me.Am using Visual studio 2010.

Edited Unassigned: I can not able to add EPPlus reference in my WPF Applications [14940]

$
0
0
The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "EPPlus" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project.


This is the error message am getting.Please some one help me.Am using Visual studio 2010.

Commented Unassigned: I can not able to add EPPlus reference in my WPF Applications [14940]

$
0
0
The currently targeted framework ".NETFramework,Version=v4.0,Profile=Client" does not include "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which the referenced assembly "EPPlus" depends on. This caused the referenced assembly to not resolve. To fix this, either (1) change the targeted framework for this project, or (2) remove the referenced assembly from the project.


This is the error message am getting.Please some one help me.Am using Visual studio 2010.

Comments: How did you install the package? Have you looked at the sample packages.
Viewing all 2262 articles
Browse latest View live


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