diff --git a/README.md b/README.md index ebae5cf..636b708 100644 --- a/README.md +++ b/README.md @@ -21,15 +21,17 @@ ### What can you do with this? -ClosedXML allows you to create Excel 2007+ (.xlsx, .xlsm, etc) files without the Excel application. The typical example is creating Excel reports on a web server. +ClosedXML allows you to create Excel 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. - +**Example:** ```c# -var workbook = new XLWorkbook(); -var worksheet = workbook.Worksheets.Add("Sample Sheet"); -worksheet.Cell("A1").Value = "Hello World!"; -workbook.SaveAs("HelloWorld.xlsx"); +using (var workbook = new XLWorkbook()) +{ + var worksheet = workbook.Worksheets.Add("Sample Sheet"); + worksheet.Cell("A1").Value = "Hello World!"; + worksheet.Cell("A2").FormulaA1 = "=MID(A1, 7, 5)"; + workbook.SaveAs("HelloWorld.xlsx"); +} ``` ### Extensions @@ -40,7 +42,6 @@ ## Developer guidelines _Full guidelines to follow later_ * Please submit pull requests that are based on the `develop` branch. - ![sample work](https://i.imgur.com/cZfW7iW.png) Your pull request will take "yourWork" branch in your repo and merge into our develop branch. * Where possible, pull requests should include unit tests that cover as many uses cases as possible. This is especially relevant when implementing Excel functions. * Install [NUnit 3.0 Test Adapter](https://github.com/nunit/docs/wiki/Adapter-Installation) if you want to run the test suite in Visual Studio. * We use 4 spaces for code indentation. This is the default in Visual Studio. Don't leave any trailing white space at the end of lines or files. To make this easier, ClosedXML has an [editorconfig](http://www.editorconfig.org) configuration file. It is recommended you install editorconfig from the Visual Studio Extension Manager.