What’s new in 0.8.8

Excel format is now available

From version 0.8.8, ReoGrid begins to support the loading and saving Excel format (2007 and later, xlsx, the OpenXML-based format). ReoGrid can load and show all worksheets from Excel file, it’s also able to modify the content and save as new Excel file. Users could make theirs template spreadsheet by Excel and display spreadsheet report or document in .NET applications (both Windows Form and WPF) by using ReoGrid 0.8.8.

However, currently some features from Excel that are not supported by ReoGrid:

  • Chart & Drawing
  • Conditional Triggers & Style theme
  • Pivot Table & Database connection
  • Some formula functions & VBA

Any floating objects, like Drawing object and Chart are not implemented in version 0.8.8 yet, they are planning to be supported in future versions.

To load Excel file into workbook:

var workbook = grid;
workbook.Load(path, IO.FileFormat.Excel2007);

ReoGrid will create and load all worksheets from the specified Excel file automatically. To save Excel file:

workbook.Save(path, IO.FileFormat.Excel2007);

About details of Excel format, see Excel file format support.

Multiple sheet support

This version starts to support the multiple worksheet from a workbook. Now applications use ReoGrid control upgrade to 0.8.8 will support the multiple sheet automatically, like as Excel ReoGrid uses a sheet tab control which gives end-users the ability to switch between worksheets for view and editing.

Fully upgraded formula parser

For correctly read and calculate the Excel formula, the formula parser core has been rewritten and improvement. New formula parsing engine keeps high-compatibility with the Excel formula language, v0.8.8 supports more than 40 commonly used functions from Excel. See Excel-Compatible Function List.

The formula parsing and calculation doesn’t need ReoScript or other 3rd-party modules, it’s fully supported by ReoGrid core. The single DLL edition will also provide the formula calculation ability.

Customize formula extension

The 0.8.8.2 version introduced new interface called FormulaExtension that is used to extend the ability of formula calculation, such as adding customize functions, parsing customize names for cell and ranges, or changing the return value for incorrect references.

For details see Customize Function.

Single DLL

There is new build package called Standard Release was available from 0.8.8, and Standard Release for .NET Client Profile was available from 0.8.8.1. Both of them are single DLL edition including most features of ReoGrid except ReoScript language extension, the formula calculation is available in this Single DLL edition.

DoAction moved to workbook

DoAction method (and other action-related methods) of worksheet have been moved to workbook (the control itself), code to call these methods is necessary to be changed to call workbook (the grid control).

0.8.7 (C#)

var sheet = grid.CurrentWorksheet;
sheet.DoAction(new SetCellDataAction("B1", 10);

0.8.8 (C#)

var workbook = grid;
workbook.DoAction(new SetCellDataAction("B1", 10);

Actions to be performed on different worksheet, will be dispatched to each worksheet by workbook automatically, they will also be undone and redone by same order.

Memory Workbook

The version 0.8.8 supports that create memory workbook rather than create a screen control, especially when loading from an Excel file, modifying the worksheet content, then saving as new Excel file, it will be very useful. Memory workbook doesn’t have screen control instance and interface modules such as view-port controller, mouse and keyboard controller, it is more faster and lightweight than the screen control.

To create a memory workbook:

var workbook = ReoGridControl.CreateMemoryWorkbook();

The API of memory workbook to load and save Excel, and manage the multi-worksheet are same as the screen control.

File Format Provider

It’s possible to add custom file format provide to ReoGrid for loading and saving custom file format. Currently there are following built-in file formats:

  • ReoGrid single worksheet xml format (supported from 0.8.0)
  • CSV file format (supported from 0.8.6)
  • Excel 2007 (OpenXML-based) file format (supported from 0.8.8)

Working with custom file format provider:

  • Custom file format provider

Move/Copy range by dragging mouse (move/copy columns)

Now selection range could be dragged to another position, this operation will move all content from original range to the new range. It is also possible to move columns by using this feature if the entire column is selected. WorksheetSettings provides the setting flags that are used to enable or disable these behaviors.

Move/Copy range by APIs

Meanwhile, there are APIs for code behind to do same operations. Below are the new methods that are used to copy or move specified range to another position.

  • Worksheet.CopyRange (CopyRangeAction)
  • Worksheet.MoveRange (MoveRangeAction)

Internal exception handling

When the exception happens during some internal operations, an event called ExceptionHappened will be fired, this new event was added from 0.8.8.0. For example, when user attempts to move a range by dragging mouse, but the range contains a part of another merged cell, since it isn’t able to do such operations, the operations will be aborted, and this event will be invoked to notify user code.

event ReoGridControl.EventHandler<ExceptionHappenEventArgs> ExceptionHappened

ReoScript Interface moved to workbook

After 0.8.8.2, the SRM (Script Running Machine) of ReoScript language extension has been moved to workbook, the below is the difference to run script from this version:

Before 0.8.8.2:

var sheet = grid.CurrentWorksheet;

sheet.RunScript("...");

After 0.8.8.2 (Including 0.8.8.2):

grid.RunScript("...");

Predefined global variable ‘grid’ was renamed to ‘workbook’ since 0.8.8.2 version.

Customize functions in ReoScript context will be available for all worksheets in a workbook.

grid.Srm["upper"] = new NativeFunctionObject("upper", (ctx, own, args) => Convert.ToString(args[0]).ToUpper());

Meanwhile, 0.8.8.2 version introduced a new interface to making formula extension, the class: FormulaExtension, which works with ReoGrid core and does not require ReoScript module. For details see Customize Functions.

Improved Drop-down List Cell

The 0.8.8.4 and 0.8.8.5 versions have many changes for improvement of Drop-down list cell, including auto deciding the drop-down button height, and keeping only one listbox instance in memory but available commonly to all drop-down list cells.

Learn more about Dropdown Cell.

Language Localization

Text used in ReoGrid are defined in the class called LanguageResource, a static class that is used only as collection of text. Modify the properties of this class to translate the default text into international language of target application. For example:

LanguageResource.Menu_InsertSheet = "Insert Worksheet";
LanguageResource.Menu_DeleteSheet = "Delete Worksheet";
LanguageResource.Menu_RenameSheet = "Rename Worksheet";

If properties have prefix Menu or Button, it is also possible to give a shortcut key for menus and buttons, for example:

LanguageResource.Menu_InsertSheet = "Insert Worksheet (&i)";

Minor changes

  • Added custom drop-down cell
  • Added custom selection from 0.8.8.4
  • Fixed clipboard operations: Copy, Paste and Cut
  • More changes refer to Change log

 Download