Source code checked in, #80652
New Post: autofit row height after setting height value
Do you know how to do it in Excel without using autofit?
New Post: autofit row height after setting height value
No, I don't think there is a way to do it without Cells->Format->Autofit height.
http://excelribbon.tips.net/T010735_Automatic_Row_Height_for_Wrapped_Text.html
That kind of explains the situation imo.
Is there any way to implement that kind of feature?
Or at least a way to "reset" the height of rows to the default which does autofit the height?
New Post: autofit row height after setting height value
New Post: autofit row height after setting height value
I have one last question that is not related to height, but data validation.
I have two worksheets.
Worksheet#1 have two cells, let's say they are A1 and B1.
A1 is a datavalidation from a list from a range from worksheet#2.
The workbook contains named ranges with a scope of the entire workbook, and the names are the possible values of the datavalidation of A1.
Then I want Cell A2 of Worksheet#1 to have a data validation of a list depending on the value of Cell A1, which can be done in excel with
=INDIRECT($A1)
pretty much A2 is getting the value of A1, and creating a dropdown menu which contains the values of ranges that have the name of the value of A1.
How can this be implemented?
I just need to know how that "=INDIRECT()" part can be done with ClosedXML.
New Post: autofit row height after setting height value
New Post: autofit row height after setting height value
Yeah, I read through the documentation and was just hoping there was a way around it.
Just because the cells do have formulas
cellWithFormulaA1.FormulaA1 = "=A2+$B$2";
I was hoping there was something similar like
Cell.DataValidation.List("=INDIRECT($A1)");
So currently no dependent drop down feature I guess? :(
New Post: autofit row height after setting height value
Created Unassigned: Cannot remove OutlineLevel [9238]
This works fine when the OutLine is added programatically and then removed programatically (via ungroup()).
var wb = new XLWorkbook("C:/Temp/OutlineInput.xlsx");
var ws = wb.Worksheets.First();
var outlinedRows = new List<IXLRow>();
ws.RowsUsed().ForEach(r => {
if (r.OutlineLevel > 0)
{
r.Ungroup(true);
outlinedRows.Add(r);
}
});
When changing XLWorkbook_Save.cs to always save the OutlineLevel to the native row object it seems to work.
// if (thisRow.OutlineLevel > 0)
row.OutlineLevel = (byte)thisRow.OutlineLevel;
Created Unassigned: Creating a new macro-enabled Excel spreadsheet does not work [9245]
I am using this code. The resulting file cannot be opened by Excel 2010 and it is actually an XLSX file. I am able to open when I change its extension to XLSX.
```
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
workbook.SaveAs("HelloWorld.xlsm");
```
New Post: Does ClosedXML/Open XML SDK work with xlsm files?
I've used the sample code and the resulting file is actually an XLSX file.
I've opened an issue:
https://closedxml.codeplex.com/workitem/9245
Is there anything I am doing wrong?
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
workbook.SaveAs("HelloWorld.xlsm");
New Post: Issue enumerating Pivot tables in xlsx
Anyone has issues accessing Pivot tables?
.WorkSheet.PivotTables.Count() returns 0 ..
... yet, when I access the xlsx via OpenXML, i can see the Pivot... using ClosedXML ver 0.69.1.0 on Framework 4.0 ... please advise, thanks....
Commented Unassigned: Creating a new macro-enabled Excel spreadsheet does not work [9245]
I am using this code. The resulting file cannot be opened by Excel 2010 and it is actually an XLSX file. I am able to open when I change its extension to XLSX.
```
var workbook = new XLWorkbook();
var worksheet = workbook.Worksheets.Add("Sample Sheet");
worksheet.Cell("A1").Value = "Hello World!";
workbook.SaveAs("HelloWorld.xlsm");
```
Comments: ** Comment from web user: borismod **
Patch is attached
New Post: Run macro whit closedxml
I can't find the way to run a macro of excel without using the interop library.
Can anyone help?
Thanks in advance
Jorge
New Comment on "Using Hyperlinks"
New Comment on "Using Hyperlinks"
New Post: Does ClosedXML/Open XML SDK work with xlsm files?
https://closedxml.codeplex.com/workitem/9245
Hope it helps
New Post: null exception when opening empty excel
var workbook = new XLWorkbook("C:\template.xlsx");
file
on SO http://stackoverflow.com/questions/22268046/closedxml-null-exception-when-open-excel
Created Unassigned: Bug - Range.CopyTo issue with partly overlapping source and target range [9247]
The issue does not seem to occur when source and target ranges do not overlap.
The issue does not seem to occur when the range spans multiple columns but only one row, at least not for my data range.
Updated Wiki: Home
Project Description
ClosedXML makes it easier for developers to create Excel 2007/2010 files. It provides a nice object oriented way to manipulate the files (similar to VBA) without dealing with the hassles of XML Documents. It can be used by any .NET language like C# and Visual Basic (VB).
Q: Dude, where have you been?
A: I've been making a survey app called Conspek. It's now open to the public. My hope is that it will be able to pay the bills and allow me to keep working on ClosedXML.
Q: Why a survey tool?
A: The same reason I created ClosedXML, I wasn't happy with my options. A while back I had to create a survey but all online survey apps were fiendishly hard, all so clunky, and with a million options in my face (that I would never use). So I created my own survey tool with the goal of making the experience as easy and simple as possible. Try it out and give me some feedback ^_^
What can you do with this?
ClosedXML allows you to create Excel 2007/2010 files without the Excel application. The typical example is creating Excel reports on a web server.
If you've ever used the Microsoft Open XML Format SDK you know just how much code you have to write to get the same results as the following 4 lines of code.
var workbook = new XLWorkbook(); var worksheet = workbook.Worksheets.Add("Sample Sheet"); worksheet.Cell("A1").Value = "Hello World!"; workbook.SaveAs("HelloWorld.xlsx");
Something more elaborate:
The Documentation page has an example of how to create the following table (Showcase) as well as many other examples: