Tips and Frequently Asked Questions

 Excel Internal units


Excel uses many different units for measuring different things, and FlexCel uses the same.

For most rendering stuff, including the PDF API, FlexCel uses points, and those is simple: A point is 1/72 of an inch. As you can see in the google calculator here.

A point is also normally used to specify font sizes: For example a font with 10 points has a bounding box of 10/72 inches.

Now, the Excel units are a little more complex. The simplest ones are the y coordinates (rows): A row is measured in 1/20 of an inch. From: https://download.tmssoftware.com/flexcel/hlp/vcl/index.htm?FlexCel.Core.TExcelFile.GetRowHeight(Int32).htm Returns the current Row height, in Excel internal units. (1/20th of a point)

But the x coordinates (columns) are way more complex. They measure how many “0” you can put in a cell in the font used in the “Normal” style, plus some margins. So, for example, the normal style for an Excel 2007 or newer file is “Calibri 11”, so if you can fit 5 “0”s in a column with that font, (“00000”) then the column width is 5. But not exactly, there are some margins too, which aren’t correctly documented in Excel docs, and which actually change depending in the screen resolution. So the width is not going to be 5, but 5.something. As explained in the help on GetColWidth ( https://download.tmssoftware.com/flexcel/hlp/vcl/index.htm?FlexCel.Core.TExcelFile.GetColWidth(Int32).htm ) you can convert between columns and rows and pixels using ExcelMetrics.ColMult and ExcelMetrics.RowMult. I wish I could tell you this is an exact science, but sadly Excel isn’t very exact about this. You can see it simply by pressing a screen preview and measuring the real width of a cell, and compare it with what you see on the screen, you’ll see it is not exactly the same.

The actual box width for a cell can also change if you use a different screen scaling: They will look different if you use say 100% or 175% screen scaling. FlexCel can offset this with the property TExcelFile.ScreenScaling ( https://download.tmssoftware.com/flexcel/hlp/vcl/index.htm?FlexCel.Core.TFlxConsts.RowMult.htm ). While by default this is 100, if you are working always in a different setting, changing this property will make FlexCel work as if it was Excel showing the file at that particular screen scaling. Changes are not much, but they exist so in general it is a bad idea to try to do “pixel perfect” designs in Excel. You always need ot leave some room because in different resolutions the cells might be slightly smaller or bigger.

For more info about how Excel units can change with the resolution, you can also read page 14 of https://download.tmssoftware.com/flexcel/docs/vcl/UsingFlexCelAPI.pdf (Autofitting Rows and Columns)


Pricing

Single Developer License Site License
 

TMS FlexCel for VCL & FMX


€ 210

65 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
MOST POPULAR

TMS VCL Subscription


€ 895

450 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS FlexCel for VCL & FMX
check  All TMS VCL products
more_horiz  Discover more
BEST VALUE

TMS ALL-ACCESS


€ 1,795

575 yearly renewal
license for 1 developer


Includes
check  Full source code
check  Access to the TMS Support Center
check  Free updates and new releases
check  TMS FlexCel for VCL & FMX
check  All TMS VCL products
check  All TMS products
more_horiz  Discover more
All prices excl. VAT. Renewal price is subject to change and only valid up to 30 days after license has expired. After renewal period a discount price is offered to renew the license.

TMS ALL-ACCESS

key
Get unlimited access to all TMS products
local_offer
One money and time saving bundle

Free Trial

Start a free TMS FlexCel for VCL & FMX evaluation today!
RAD Studio

What our customers say

We had a very positive Flexcel talk in our meeting yesterday. Dave Martel was very positive about the product; the support; speed to fix an issue. By doing the talk he realised improvements over the years and has an amazing success story from analysing a large number of human created spreadsheets (1000’s of spreadsheets with 1000’s of readings). The speed of analysis allowed them to refine and re-train the importer to deal with human vagaries (comments / colour etc).

- Jason Chapman

Wow, I'm really impressed that you found this out in such a short time! Thanks especially for testing it with Softmaker Office itself and with some more elaborate spreadsheets, this makes me confident that it'll work with the "real life" files that I have to handle. Super service!

- Arthur Hoornweg

It's now very easy to build a report with the new Flexcel + Aurelius integration. It was so easy that I really thought I was doing something wrong. I will never go back to a report generator, Flexcel is way cooler and easier for reports

- Eduardo Elias

Another vote for Flexcel here, since the rewritten and updated Flexcel came out a year or two ago, I only use that. Mostly I use it to read XLS and XLSX files, which it does much faster and more flexibly than Excel automation, in my experience. If you also need to write XLS and XLSX files (which I do occasionally) Flexcel has the most amazing utility named 'ApiMate'. You can design your output report in Excel, including only a minimum of actual data, but with all the detailed formatting, headings, and column, row and cell properties you need. Then point ApiMate at the Excel file, and it generates a Delphi program to write the entire XLS file using the Flexcel API, with all the attributes matching those you created in Excel itself. It is then the work of a few moments to adapt the ApiMate-created functions to handle your real data. Magic! Flexcel support is prompt and helpful, too.

- Tim Frost

Thanks for an excellent product. I did have some issues Friday but these were expertly solved by Adrian Gallero over the weekend. I cannot recommend you products and service high enough. Thanks and kind regards

- Kevin Clegg

TMS WEB Core

language
Create modern web apps in Delphi & VSC
build_circle
Use Object Pascal code to build JavaScript apps