WinForms Spreadsheet Control (coming in 13.1)

Whether we like it or not, the spreadsheet has become a de facto analysis tool for small datasets. Its debut in June of 1979 as a software package called VisiCalc predated my own birth by an entire month!

VisiCalc 
Source: http://commons.wikimedia.org/wiki/File:Visicalc.png

Since then there have been a number of revisions and consolidations culminating in the widely known software package we all know and love: Microsoft Excel. At DevExpress we recognize the importance spreadsheets and wanted to empower our users to take advantage of the rich facilities this tool provides without the hassle of having to learn a complex API or interact with foreign runtimes. To give you an idea of how easy it is to work with our client agnostic API I wrote a simple console application that generates an entire Excel spreadsheet in about 5 minutes:

// 1. Creating document
Workbook book = new Workbook();
var sheet = book.Worksheets.Add("mysheet");

// 2. Adding Data
Random r = new Random(DateTime.Now.Millisecond);
for (int i = 0; i < 15; i++)
{
    for (int j = 0; j < 20; j++)
    {
        sheet.Cells[i, j].Value = r.NextDouble() * 100;
        if ((i + j) % 2 == 0)
            sheet.Cells[i, j].Font.Color = Color.Red;
        else
            sheet.Cells[i, j].Font.Color = Color.Blue;
    }
}

// 3. Saving Spreadsheet
book.SaveDocument("myfile.xls");

UPDATE: Found a better and more correct way of doing the same thing in less lines of code thanks to the development team (updated above).

As is to be expected, the largest portion of the application deals with generating data. Notice how easy it is to access, edit, and style each individual cell. During our initial usability tests I mentioned to the development team that there were a number of things we should be able to do easily and without much ceremony. I then sat down and tried to implement a couple of things I thought should be easy. Within a matter of minutes I had completed each task without assistance or intervention from the development team.

One of the tasks that proved to be the easiest was using the SpreadsheetControl inside of a WinForms application. In a couple of clicks you can create a fully functioning spreadsheet application complete with formatting, layout, forumlas, etc.:

DevExpress Spreadsheet Control

I am extremely proud of the work that has been done in order to get these great tools to you, our valued customer.

As always, if there are any comments and/or questions, feel free to get a hold of me!

Seth Juarez
Email: sethj@devexpress.com
Twitter: @SethJuarez

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.