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

Created Unassigned: Problem opening workbook containing Table with no headers [9400]

$
0
0
Hi, I am receiving Object Reference exception when trying to instantiate an existing workbook having a table with removed Header Row. Using latest production ClosedXML.

New Post: item.Cell(10).ValueCached returns different data

$
0
0
Value is what the cell resolves to (may be based on a formula). ValueCached is the last value Excel saved to the file (again probably because the cell had a formula).

Commented Unassigned: Problem opening workbook containing Table with no headers [9400]

$
0
0
Hi, I am receiving Object Reference exception when trying to instantiate an existing workbook having a table with removed Header Row. Using latest production ClosedXML.
Comments: attach the file

Created Unassigned: Unable to change font color when using DataTable [9401]

$
0
0
The following code does not work correctly. It does change the background color to white, however the text color doesn't change to black making the header row appear blank.

```
var wb = new XLWorkbook();
wb.Style.Fill.BackgroundColor = XLColor.White;
wb.Style.Font.FontColor = XLColor.Black;
// Add a DataTable as a worksheet
wb.Worksheets.Add(dataTable);
foreach (var worksheet in wb.Worksheets)
{
foreach (var table in worksheet.Tables)
{
table.ShowAutoFilter = false;
}
}
wb.SaveAs(excelFileName);
```

Closed Unassigned: Unable to change font color when using DataTable [9401]

$
0
0
The following code does not work correctly. It does change the background color to white, however the text color doesn't change to black making the header row appear blank.

```
var wb = new XLWorkbook();
wb.Style.Fill.BackgroundColor = XLColor.White;
wb.Style.Font.FontColor = XLColor.Black;
// Add a DataTable as a worksheet
wb.Worksheets.Add(dataTable);
foreach (var worksheet in wb.Worksheets)
{
foreach (var table in worksheet.Tables)
{
table.ShowAutoFilter = false;
}
}
wb.SaveAs(excelFileName);
```
Comments: When you create the table it has the default theme. In your case just set the theme to none.

New Post: I know better not to ask for next version but...

$
0
0
...your last release was on Sep 17, 2014.

I did build the latest source and my problem is fixed but the build server uses NuGet auto restore and the build fails because the last package does not contain the source from October 2014. :(

So, any idea when the next version will be available?

Released: ClosedXML 0.76.0 (Dec 16, 2014)

$
0
0
  • Add Remove and RemoveAll methods for conditional formats.
  • Fix issue when changing a table column names
  • Set ApplyNumberFormat and ApplyAlignment to true

Created Release: ClosedXML 0.76.0 (Dec 16, 2014)

$
0
0
  • Add Remove and RemoveAll methods for conditional formats.
  • Fix issue when changing a table column names
  • Set ApplyNumberFormat and ApplyAlignment to true

New Post: I know better not to ask for next version but...

New Post: I know better not to ask for next version but...

$
0
0
Heartfelt thanks to you for granting requests. I will definitely not make such a request often. :)

Commented Unassigned: Problem opening workbook containing Table with no headers [9400]

$
0
0
Hi, I am receiving Object Reference exception when trying to instantiate an existing workbook having a table with removed Header Row. Using latest production ClosedXML.
Comments: Attachment added. Very simple. Just convert a range to a table without checking "My Table has headers". Excel will create header for it "Column1", "Column2" etc... Then go to table design and uncheck "Header Row"

New Post: How do I stop getting the "number stored as text" message?

$
0
0
I am having a similar issue. I have an Oracle datasource that I'm importing into a datatable (via ODP.NET).

I can create the spreadsheet, but I always get the "number stored as text" message. I have been using a workaround, but now I have a data set that's just too big.

Here is how I'm currently trying to solve the issue: (formatCols is a list of NameActionDictionary, which contains column name, position and format)
       foreach (NameActionDictionary numCol in formatCols)
       {
            ws.Cell(1, numCol.ColLoc).Value = 0;
            ws.Column(numCol.ColLoc).DataType = (numCol.ColType == "date") ? XLCellValues.DateTime : XLCellValues.Number;
            if (numCol.ColType != "date" && numCol.ColType != "number")
            {
                ws.Column(numCol.ColLoc).Style.NumberFormat.Format = getNumberFormatType(numCol.ColType);
            }
            ws.Cell(1, numCol.ColLoc).DataType = XLCellValues.Text;
            ws.Cell(1, numCol.ColLoc).Value = numCol.ColHead;
        }
Is there anyway I can solve this problem? I want dates and numbers to be stored as such.

Thanks.

New Comment on "How do I deliver an Excel file in ASP.NET?"

$
0
0
I had errors whith Response.End() so I changed by Response.Flush() and Response.Close() and it solved the erro (Thread aborted) but it does not donwload the file.

New Post: How do I stop getting the "number stored as text" message?

$
0
0
The thing is that your data table is the one that defines the data type. The best thing would be to fix the data table so it stores numbers as numbers and not as strings. That may not be possible for many reasons so what you're doing is pretty much your only option.

New Post: How do I stop getting the "number stored as text" message?

$
0
0
Do you have any ideas for reducing the amount of space that's used up (increasing efficiency)? My dataset is 40 columns by 800 rows. I haven't been able to create the file with proper formatting.

Thanks.

New Comment on "Styles - Font"

$
0
0
I want to use a variable as the IXLFont tst = new IXLFont(), to be able to return values from functions, but get an error. Нow do I create one?

Created Unassigned: Formula evaluation fails with single quotes in worksheet name [9402]

$
0
0
This seems rather fundamental, but after an extensive search I can't seem to find anything related to a problem I'm having.

I'm getting a "Identifier Expected" error when trying to evaluate a formula with the worksheet name in single quotes and containing spaces:
```
string test = "IF('Income & Expense'!H34 <> \"\", 'Income & Expense'!H34, IF('Income & Expense'!H35 <> \"\", 'Income & Expense'!H35, \"\"))";
var val = multiWorkbook.Evaluate(test);
```
I simplified this to:
```
string test = "'Income & Expense'!H34";
```
and get the same "Identifier Expected" error. Removing the single quotes I get "There isn't a worksheet named Expense".

Is there another way to specify spaces in worksheet names? Or is something else going on?

Commented Unassigned: Formula evaluation fails with single quotes in worksheet name [9402]

$
0
0
This seems rather fundamental, but after an extensive search I can't seem to find anything related to a problem I'm having.

I'm getting a "Identifier Expected" error when trying to evaluate a formula with the worksheet name in single quotes and containing spaces:
```
string test = "IF('Income & Expense'!H34 <> \"\", 'Income & Expense'!H34, IF('Income & Expense'!H35 <> \"\", 'Income & Expense'!H35, \"\"))";
var val = multiWorkbook.Evaluate(test);
```
I simplified this to:
```
string test = "'Income & Expense'!H34";
```
and get the same "Identifier Expected" error. Removing the single quotes I get "There isn't a worksheet named Expense".

Is there another way to specify spaces in worksheet names? Or is something else going on?
Comments: Check out this posting to see suggestions for worksheet names [http://www.excelcodex.com/2012/06/worksheets-naming-conventions/](http://www.excelcodex.com/2012/06/worksheets-naming-conventions/) It says that if you include a space in the worksheet name, Excel would add the single quotes to the name itself. So to access the name from code you would need to put the quotes around the whole thing, which you did. Try writing the formula in Excel and see if it works, and then try using it in the ClosedXML application.

Commented Unassigned: Formula evaluation fails with single quotes in worksheet name [9402]

$
0
0
This seems rather fundamental, but after an extensive search I can't seem to find anything related to a problem I'm having.

I'm getting a "Identifier Expected" error when trying to evaluate a formula with the worksheet name in single quotes and containing spaces:
```
string test = "IF('Income & Expense'!H34 <> \"\", 'Income & Expense'!H34, IF('Income & Expense'!H35 <> \"\", 'Income & Expense'!H35, \"\"))";
var val = multiWorkbook.Evaluate(test);
```
I simplified this to:
```
string test = "'Income & Expense'!H34";
```
and get the same "Identifier Expected" error. Removing the single quotes I get "There isn't a worksheet named Expense".

Is there another way to specify spaces in worksheet names? Or is something else going on?
Comments: Thanks for the reply. Unfortunately, I don't have any control over the worksheet names, so not sure what a workaround is. Yes, the formula works in Excel.

New Post: Github

$
0
0
Github seems to get a lot more traffic than CodePlex. Would you think about placing a copy on Github?
Viewing all 1877 articles
Browse latest View live


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