Initial commit of the ClosedXML library
Establishes the foundational structure, core Excel functionality, and tooling. - Implements base components for cells, ranges, columns, and rows. - Integrates a custom calculation engine with a wide range of Excel functions. - Adds comprehensive support for styling, conditional formatting, data validation, comments, pictures, and charts. - Configures build setup, project metadata (NuGet), and developer guidelines. - Includes editor and Git attributes for consistent code style and line endings.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using ClosedXML.Excel;
|
||||
|
||||
|
||||
namespace ClosedXML_Examples.Ranges
|
||||
{
|
||||
public class SelectingRanges : IXLExample
|
||||
{
|
||||
public void Create(String filePath)
|
||||
{
|
||||
var wb = new XLWorkbook();
|
||||
var wsActiveCell = wb.AddWorksheet("Set Active Cell");
|
||||
wsActiveCell.Cell("B2").SetActive();
|
||||
|
||||
var wsSelectRowsColumns = wb.AddWorksheet("Select Rows and Columns");
|
||||
wsSelectRowsColumns.Rows("2, 4-5").Select();
|
||||
wsSelectRowsColumns.Columns("2, 4-5").Select();
|
||||
|
||||
var wsSelectMisc = wb.AddWorksheet("Select Misc");
|
||||
wsSelectMisc.Cell("B2").Select();
|
||||
wsSelectMisc.Range("D2:E2").Select();
|
||||
wsSelectMisc.Ranges("C3, D4:E5").Select();
|
||||
|
||||
wb.SaveAs(filePath);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user