Quantcast
Channel: ClosedXML - The easy way to OpenXML
Viewing all 1877 articles
Browse latest View live

New Post: set picture fill for comment

$
0
0
Hello,

I need to set picture fill for the cell comment.
But I could not find how to do.
Is that property absent?
If not, can you define the way ?
Thank you

(actually I found it in spreadsheetlight tool but to use two libararies in the same project make it troublesome - causes problem using different versions of documentformat assemblies in .NET)

New Post: Problem with the formula

$
0
0
Hello. I have a problem with the recording of the formula in the cell. Formula - "=IF(A6>$A$4;0;1-(E6+F6)/C6)".

Sample Code:

var workbook = new XLWorkbook();
var worksheets = workbook.Worksheets.Add("Sheet 1");

worksheets.Cell(4, 1).Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);
worksheets.Cell(6, 1).Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day);

worksheets.Cell(6, 3).Value = "3";
worksheets.Cell(6, 5).Value = "5";
worksheets.Cell(6, 6).Value = "6";

worksheets.Cell(2, 2).FormulaA1 = "=IF(A6>$A$4;0;1-(E6+F6)/C6)";

workbook.SaveAs("123.xlsx");



When opening a file I get an error - "Excel found unreadable content in '123.xlsx'. Do you want to recover the contents of this workbook? If you trust the source of this workbook, click Yes."

Offline formula in cell (2, 2). Tell me what am I doing wrong?

New Comment on "Finding and extracting the data"

$
0
0
Is this the only documentation about how to read data? I find this example very lacking in detail and hard to learn from. Pretty please make something more in depth!

New Post: Better tutorial on how to read data?

$
0
0
I find the tutorial in the 'real world examples' documentation to be very lacking in detail and hard to learn from. Does anyone know where I can find something better?

New Post: Access to WorkbookView Class for Tab Ratio

$
0
0
It doesn't appear that there is a way to access "DocumentFormat.OpenXml.Spreadsheet.WorkbookView" in order to modify the "TabRatio" for a particular workbook. This is the value that tells Excel how much space to leave for the tabs (worksheets).

Any ideas?

Thanks!

New Comment on "Showcase"

$
0
0
@MEERAM395 At a guess? "var excelTable = rngData.CreateTable();" is creating a Pivot Table, hence the filter drop downs which are part of the table, not the worksheet

New Post: Vlookup function supported by Closedxml

$
0
0
Any more news on Vlookups support? This would be a great feature for us.

New Post: Formula support - IRR & NPV

$
0
0
UP!

Any news on this question please?

Created Unassigned: Unable to open generated .xlsx [9465]

$
0
0
I'm wondering if the .xlsx file generated with ClosedXML is really "standard", since when I open it with Excel the document gets "fixed" in some way: when I try to close the window, Excel shows me an alert saying that the file should be saved.

In addition to that, I've noticed that if I open the file with an application based on EPPlus library, the file is displayed with no data: only an empty worksheet with empty cells!

See also my previous post regarding iPad compatibility: https://closedxml.codeplex.com/workitem/9455
Are the two problems connected, maybe?

Created Unassigned: AddConditionalFormat() does not localize properly for French [9466]

$
0
0
I am using conditional formatting and it works great with my U.S. settings. When I try to localize my application, the conditional formatting in the translated spreadsheets works great for Italian and German, but in French the conditional formatting is incorrect.

The AddConditionalFormat().WhenEqualOrLessThan() methods do not work correctly when the locale is French. It adds quotes to the conditional statement. When I open it in Excel the Rule looks like:

Cell Value <= "-98.00002"

It is supposed to be:

Cell Value <= -98.00002

In the case of French localization, the extraneous quotes are added, but not the the Italian and German cases.

Following is my actual code:

ws.Range(r, 1, r, 2).Style.Alignment.Horizontal = XLAlignmentHorizontalValues.General;

__ws.Cell(r, 2).AddConditionalFormat().WhenEqualOrLessThan(-98.00002f). Font.SetFontColor(XLColor.LightGray);__

ws.SheetView.FreezeRows(2);
ws.Columns().AdjustToContents();

Any idea what could be causing this error?

New Post: Macros

$
0
0
Hello.

This componet can execute Macro.

Example in excel

excelApplication.Run("Módule1.DoSomething", Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing,
            Type.Missing, Type.Missing);

Created Unassigned: Can't disable the default column filter [9467]

$
0
0
Hi,

It seems that it is not possible to disable the default column filter.

I tried a few options including

MyWorkSheet1.AutoFilter.Enabled = false

but the generated excel still has filters on all columns.

Any solution yet?

Thank you
Alex



Reviewed: ClosedXML 0.76.0 (Dec 13, 2015)

$
0
0
Rated 5 Stars (out of 5) - A few minor features doesn't seems to be working but overall all excellent solution and really easy to use.

Created Unassigned: ClosedXML open .xlms [9468]

$
0
0
Hi,
I'm trying to read a .xlms file and its not opening. I have search a bit and found that probably ClosedXML doesn't read .xlms files, and this is available here on codeplex ( https://closedxml.codeplex.com/workitem/9245 ) but I cant seem to apply this. Any help doing this? Or is there a better alternative to ClosedXML and interop?

Thank you

Edited Unassigned: ClosedXML open .xlms [9468]

$
0
0
Hi,
I'm trying to read a .xlsm file and its not opening. I have search a bit and found that probably ClosedXML doesn't read .xlsm files, and this is available here on codeplex ( https://closedxml.codeplex.com/workitem/9245 ) but I cant seem to apply this. Any help doing this? Or is there a better alternative to ClosedXML and interop?

Thank you

Created Unassigned: Cell ranges are not supported in the PRODUCT function [9469]

$
0
0
Hi.

If you run this code, everything will be OK.

```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1,B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsTrue(result == 24);
```
But if you try to use a range (A1:B1 instead of A1,B1), then only the first cell is evaluated.
```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1:B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsTrue(result == 24);
```

Edited Unassigned: Cell ranges are not supported in the PRODUCT function [9469]

$
0
0
Hi.

If you run this code, everything will be OK.

```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1,B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsTrue(result == 24);
```
But if you try to use a range (A1:B1 instead of A1,B1), then only the first cell is evaluated.
```
var book = new XLWorkbook();

var ws = book.AddWorksheet("ws");

ws.Cell("A1").Value = 2;
ws.Cell("B1").Value = 3;
ws.Cell("C1").FormulaA1 = "PRODUCT(A1:B1,4)";

var result = ws.Cell("C1").GetDouble();

Assert.IsFalse(result == 24);
```

Created Unassigned: Out Of Memory Creating file [9470]

$
0
0
I am creating an excel file. I cannot seem to get more than 100,000 rows total per workbook before getting an out memory exception. I have turned tracking off.

What do I need to supply to help you give me direction on how to solve this?

Created Unassigned: Error when i try release my project using CodeXML [9471]

$
0
0
When i try release my project, the error is in spanish and say

__Advertencia 1 La referencia principal "ClosedXML" no se pudo resolver porque se generó con la versión de .NET Framework ".NETFramework,Version=v4.0,Profile=Client". Esta es una versión posterior a la versión de .NET Framework de destino actual ".NETFramework,Version=v3.5". spirit
__

But, when i try to install the .Net Framewor 4.0 it say me " this version was intalled"

Please help me, thank in advance.

New Comment on "Copying Worksheets"

$
0
0
Ruh roh, I need DrawingsPart copied too. :(
Viewing all 1877 articles
Browse latest View live