We’ve now released v14.1 of DevExpress Universal and, although we shall continue to discuss the new improvements found in there for a while, it’s now time to turn to v14.1 of the DevExpress VCL Subscription. And do we have lots of good news for you on that front.
In this first post about VCL 14.1, I’m going to reveal what the team have been working on for at least the past 9 months: a completely redesigned and rewritten spreadsheet control. We understand that in the business arena there are certain applications you’d like to write that would be enhanced by giving your users the ability to model and analyze data in a familiar spreadsheet environment. Shelling out to Excel is to be avoided, especially as you must make sure that every PC your application runs on has Microsoft Office installed. What you’d like is to somehow provide a spreadsheet panel within your application that can read and write XLS and XLSX files, that works just like Excel does, where you can format cells, insert images, calculate with the standard functions, and so on.
Well, inspired by Microsoft Office and Excel, we have totally re-engineered the VCL Spreadsheet, starting from scratch.
Here is an example of the spreadsheet control displaying a simple invoice, read from an XLSX file. Or is it? I get so confused. Here it is again:
I can’t quite remember which image is from the VCL Spreadsheet demo in the beta and which is from Excel. Sheesh.
Seriously, these two images should show you how well we’ve been inspired by Microsoft Excel. This image (OK, the top one) shows such features as cell formatting (the lines and the grey bars in the grid to help separate the rows). Notice also the formatting of values. I’m more familiar with monetary values being right-adjusted rather than center-adjusted.
So, select the cells, right-click, then select Format Cells…
And then select right horizontal alignment.
Also, the VCL Spreadsheet Control supports embedding images into the worksheet:
Here we see two images: the first is the triangle figure on the right and the other the mathematical formula on the left. The spreadsheet is also displaying an error message alongside the calculated value (whose formula by the way is
=0.5*F9*F10*SIN(F11*PI()/180)) because one of the sides is negative. This is done (along with the special coloring of the background) through the spreadsheet API.
Talking of special APIs, how about the ability to create custom functions? You know, because the standard ones just don’t cover your business needs. With this demo above, you can create a special function in your Delphi or C++Builder code, register it with the Spreadsheet API, and then have a formula like this:
=TRIANGLEAREA(F9,F10,F11). Obviously, should you save this worksheet, you won’t be able to open the XLSX file with Excel, but you will be able to with your application containing your special registered functions. It’s a way of protecting your business logic and IP and yet all the time using a widely-used and understood file format.
So, do you think you’ll be able to use this new control? Let me and the team know what you think.