background preloader

.Net & Excel

Facebook Twitter

MAML Migration: The Next Step in the Evolution of Help Authoring. Are you part of that herd of developers that is used to documenting applications by writing help topics in raw HTML?

MAML Migration: The Next Step in the Evolution of Help Authoring

The power of it is nice, being able to add a pinch of bold here, a splash of italics there, some CSS for different layouts, a floating image, several nested tables, an abundance of hyperlinks, embedded Flash and media players, and even some JavaScript to boot. What more could we want? Or maybe a better question is, what could possibly make us want to give any of that up? XML Documentation Comments Well, XML documentation comments that may be added to code modules (I'm assuming everyone's familiar with this stuff by now) was one thing that prompted .NET developers to start documenting their code without using HTML. Compare XML documentation to your legacy HTML help topics and what do you notice?

Now you might be thinking, "Dave, it's not entirely true that XML documentation is without formatting. Sandcastle Now's probably a good time to introduce Sandcastle. A MAML Example. Reading an Excel spreadsheet into dynamic objects - .NET Development - Gal Ratner. Excel represents documents using Office Open XML (OOXML), a zipped XML based format developed for spreadsheet and chart representation.

Reading an Excel spreadsheet into dynamic objects - .NET Development - Gal Ratner

In this article I am going to demonstrate parsing an Excel spreadsheet and loading the data into a generic List. OOXML was incorporated into Office in 2007 therefore the following code will not work with older versions of Excel.This is our spreadsheet: In order to read and parse the Spreadsheet we are going to use the Open XML SDK 2.0 for Microsoft Office available for download from Microsoft. The complete SDK includes the DocumentFormat.OpenXml library and some productivity tools that will help you examine the structure of Office documents. Open XML SDK is built on top of System.IO.Packaging so in order to use the DocumentFormat.OpenXml library you also need to import WindowsBase.dll. Let’s begin by loading the correct worksheet into a SpreadsheetDocument ExtractRowsData(data, worksheet, ssTable, cellFormats); } return data; }

Julia Hafo - Développeur informatique. How to read an excel file in C# without using Microsoft.Office.Interop.Excel libraries. Excellibrary - Excel fileformat library. Generating Excel Workooks without Excel - CarlosAg Blog. Dear All, Pls Help me!

Generating Excel Workooks without Excel - CarlosAg Blog

Public class ExcelGenerator // Methods public static Workbook Generate(DataGridView dataGridView) //ExcelWorkbook workbook = new ExcelWorkbook(); Workbook workbook = new Workbook(); Macaferi's blog: Creating Excel spreadsheets .XLS and .XLSX in C# Interesting discussion at StackOverflow: Create Excel (.XLS and .XLSX) file from C# If you want to see how to combine NPOI + Excel Table and Chart, take a look at the post titled NPOI with Excel Table and dynamic Chart.

Macaferi's blog: Creating Excel spreadsheets .XLS and .XLSX in C#

NPOI 2.0 series of posts scheduled. Macaferi's blog: NPOI with Excel Table and dynamic Chart. A reader of the blog called Zip wrote a comment on the post Creating Excel spreadsheets .XLS and .XLSX in C#.

Macaferi's blog: NPOI with Excel Table and dynamic Chart

This is an excerpt from Zip’s comment: … if I add rows using NPOI in C#, rows added under the table won't be automatically included in the table, and my chart is not updated the way I would like it to be. How can I work around this problem? Работа с Excel из C#. Столкнулся с необходимостью поработать с файлами Excel из C#.

Работа с Excel из C#.

Задачи простые - считать данные из книги Excel, создать новую книгу Excel, внести в нее данные. Предполагается, что Excel на компьютере имеется, но какой версии, не известно. Файлы по размерам маленькие, скорость работы не критична. Существует несколько вариантов работы с Excel из C#: автоматизация Excel, подключение через OleDB/ODBC, дополнительные библиотеки (Aspose Excel), работа через XML, через Open XML и т.п. Наиболее простой вариант - воспользоваться автоматизацией Excel. Проблема одна - сборки "Microsoft.Office.Interop.Excel" для каждой версии Excel разные. Можно воспользоваться поздним связыванием. Выход нашелся. Идея реализации, вкратце, следующая. Каждый COM-объект автоматизации "заворачивается" в класс COMWrapper, унаследованный от RealProxy.