Using Delphi 11.2 and the latest Flexcel VCL.
I'm using Flexcel to open some Excel files that have data tables. These tables contain a couple of blank rows and I need to add lots of rows to the table. The data is held in various Delphi classes and I'm not using databases at all.
I'm wondering what the best way of doing this is? I did have a look through the examples but couldn't find much relating to Excel tables.
So far I have just entered the data using SetCellValue and then set the Bottom of the table range to the last row. The problem with this is column formulae do not get applied to the data in the new rows, so I'm thinking there may be a better way to achieve what I am trying to do? I've tried expanding the table range before adding the data but this doesn't work either. Do I need to manually add the formula to the new rows? I'd like to avoid doing this as sometimes my end users need to add further rows and in this case they rely on the column formula being present.
A further problem I have encountered is that the column formula in one column in the table refers to the sixth column in the same table by column name (e.g. =[@[Col name6]), but when I open the file it is now referring to the fourth column (e.g. =[@[Col name4]). If I enter the formula directly using SetCellValue with TFormula.Create('=My_Table_Name[Col name6]') it still references the fourth column when I open the file! Any ideas what's going wrong there?