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

Commented Unassigned: [OpenXML 2.5] Creating a table with no rows corrupts workbook (permitted in ClosedXML) [9161]

$
0
0
_It seems this only applies to OpenXML 2.5. However, v2.5 is shipping with Microsoft products which is super seeds OpenXML 2.0. For future compatibility it would be good to be resolved_

Seems having only a single header row and creating a table in ClosedXML results in a corrupt workbook when opened with Excel 2013.

Excel 2013 handles this in the following ways when creating a new table with only one row of data;

* automatically create a header/data row (Depending on options selected in dialog) to ensure there is more than one row.

![Image](http://i.imgur.com/XztT8dv.png)
![Image](http://i.imgur.com/PftUnsp.png)

* when attempting to delete all rows, a single "empty" data row is retained to comply with the "must have a data row" rule
Comments: ** Comment from web user: jpsfs **

I can reproduce this also.
The workaround at this moment is:
> Insert a empty row in the table;
> Save the workbook;
> Delete the empty row;
> Save the workbook again.

This generates a lot of IO operations, undermining the performance.


New Post: Convert Table To Range (or some other way)

$
0
0
3 years later and this is exactly the same issue I am having?
Did you ever add this feature?

Commented Issue: Convert Table To Range (or some other way) [7425]

$
0
0
I don't think there's a way to turn off a table like you can with auto filters but I'll add it.
Comments: ** Comment from web user: trevormackay **

is there a way to do this? If so how?

Commented Issue: Convert Table To Range (or some other way) [7425]

$
0
0
I don't think there's a way to turn off a table like you can with auto filters but I'll add it.
Comments: ** Comment from web user: trevormackay **

Never mind, I found the solution under a different Issue: __How to remove table theme?__


You wrote:
What you want seems to be to convert the table to a range. To do this just delete the table definition: worksheet.Tables.Remove(index/name)

that solves my problem!!!

Created Unassigned: Bug if worksheet name contains ' character [9220]

$
0
0
If a a worksheet name contains one or more apostroph characters (') and if a print area is defined for that worksheet, then __new XLWorkbook("mybook.xlsx")__ fails.

The problem is in XLWorkbook_Load.cs

```
private static void ParseReference(string item, out string sheetName, out string sheetArea)
{
var sections = item.Trim().Split('!');

// If the worksheet name is "D'Artagnan" (encoded as 'D''Artagnan')
// *all* apostrophs will get stripped and we get "DArtagnan" instead of "D'Artagnan"
sheetName = sections[0].Replace("\'", "");
sheetArea = sections[1];
}
```

This will lead to an exception later in the XLWorksheets.Worksheet method.

The attached xlsx file exposes the bug.

Commented Unassigned: Bug if worksheet name contains ' character [9220]

$
0
0
If a a worksheet name contains one or more apostroph characters (') and if a print area is defined for that worksheet, then __new XLWorkbook("mybook.xlsx")__ fails.

The problem is in XLWorkbook_Load.cs

```
private static void ParseReference(string item, out string sheetName, out string sheetArea)
{
var sections = item.Trim().Split('!');

// If the worksheet name is "D'Artagnan" (encoded as 'D''Artagnan')
// *all* apostrophs will get stripped and we get "DArtagnan" instead of "D'Artagnan"
sheetName = sections[0].Replace("\'", "");
sheetArea = sections[1];
}
```

This will lead to an exception later in the XLWorksheets.Worksheet method.

The attached xlsx file exposes the bug.
Comments: ** Comment from web user: MichaelWalz **

Proposed fix:

```
private static void ParseReference(string item, out string sheetName, out string sheetArea)
{
var sections = item.Trim().Split('!');
sheetName = sections[0] ;
if (sheetName[0] == '\'')
{
sheetName = sections[0].Substring(1, sections[0].Length - 2);
sheetName = sheetName.Replace("\'\'", "\'");
}

sheetArea = sections[1];
}
```

Created Unassigned: Bug if Worksheet name contains comma [9223]

$
0
0
If a a worksheet name contains one or more commas and if a print area is defined for that worksheet, then new XLWorkbook("mybook.xlsx") fails.

Related to issue 9220

Patch Uploaded: #15877


New Post: Name of named range in formula changes when deleting rows

$
0
0
I have a template with named ranges for headings i.e =Head38 where Head38 references 'Sheet1':$A$2'. The headings are in row 3.
When I insert new rows using "InsertRowsBelow(n)", the headings remain the same. However when I delete rows (.Row(n).Delete()), the formula in the heading row changes to =Head28.

The heading is in row 3 and I am deleting blank rows from row 9 to row 100. See code below
xadj = 9
Do Until xadj = 100
   If String.IsNullOrEmpty(ws.Cell(xadj, 1).Value) Then
       ws.Row(xadj).Delete()
   Else
       If InStr(ws.Cell(xadj, 1).Value.ToString(), "Total capital") <> 0 Then
           Exit Do
       End If
       xadj = (xadj + 1)
   End If
Loop

New Post: Is a .Net Framework 4.5 or 4.5.1 release of ClosedXml coming for VS 2012?

$
0
0
I hope this is not a repeat question. Also, being a developer, hope this is not a pushy questions. :-)

Is the .Net Framework 4.5 or 4.5.1 release of ClosedXml coming for VS 2012?

I am using VS 2010 and .Net 4.0, but a switch is coming soon at work.

Thanks in advance,

John

New Post: Is a .Net Framework 4.5 or 4.5.1 release of ClosedXml coming for VS 2012?

$
0
0
I also join ti this question (not to create a similar):

When I will able to use ClosedXml with VS 2012 on Windows Store App?

Thanks in advance.

Andrew.

New Post: Is a .Net Framework 4.5 or 4.5.1 release of ClosedXml coming for VS 2012?

$
0
0
I hope we can get an idea on this soon. Maybe it would be simple, just change the reference to the framework, then update the OpenXml dll reference to the most current. I'm not sure without opening the source code.

Anyone, is closedxml headed for .Net 4.5 anytime soon?

Hate to stop using a great add-in like this because of framework issues.

It should be simple to upgrade and test with a new framework.

Anyone else have thoughts, needs on this?

New Comment on "How can I insert an image?"

$
0
0
Any plans to support image insertion? It is the only reason why I cannot choose ClosedXML to produce Excel files...

New Post: Iphone-Ipad cant open genereted files

$
0
0
Hi, after update software on my Ipad, i have new error message
Image

New Comment on "Column Width and Styles"

$
0
0
How do you set the column to 'AutoFit' to its contents?

New Post: AutoFit Row Height

$
0
0
I'm trying to find out how to do this for columns as well. Find anything yet?

New Comment on "Conditional Formatting"

$
0
0
Is it possible to use Excel 2010 databar features? (solid fill instead of gradient and border color)

New Post: AutoFit Row Height

Created Unassigned: Support functions ISERROR, ISTEXT, ISNUMBER (etc) [9236]

$
0
0
Is there any possibility for supporting the following functions?

ISERROR
ISTEXT
ISNUMBER
...etc.

Or provide/document a way to register functions, so I can implement them myself?

Thanks!

New Post: autofit row height after setting height value

$
0
0
Hello, I have an excel document that I want to manually adjust the height to 13.50 (18 pixels)
I saw no other way to set the default height, so
worksheet.Rows().Height = 13.5;
did that for me. However, once you manually set the height, I realized that when you are putting in long text in a cell even if text wrap is enabled, the outcome height will not adjust.
With calibri font and font size 10, the cells become around size 14 for every line when calling the row.adjusttocontent() method so if anybody can give me tips to either set the default height without ruining the textwrap auto height adjust, I'll be so glad :)
Viewing all 1877 articles
Browse latest View live


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