AdvGridWorkbook <-> AdvGridExcelExport <-> Flexcell


I'm trying to fill an AdvGridWorkbook with steps describe here:

My code:

 xls := TExcelFile.Create; //created once
  if FileOpenDialog1.Execute then
    xls.ConvertFormulasToValues(false, true);

With AdvGridExcelImport, when using an AdvGridWorkbook, no data will be displayed.
If I replace my AdvGridWorkbook with an AdvGrid, grid is correctly filled

Is there any existing issue when working with AdvGridWorkbook ?

Kind regards

We aren't aware of issues, but there of course always be one.
I made a very simple app here:

And it seems to be working as expected. Can you find a way to modify it so it shows your problem, or maybe send me a different app with the issue to

Hi Adrian,

I was the culprit I guess… If you look at structure pan, 2 TAdvGridWorkbooks where create as child into AdvGridWorkbook1 !!! Sorry for that.

I still have a question for you:

After loading an Excel file, ROW[0] and COL[0] stay empty. How can I mimic Excel and get both ROW[0] and COL[0] values filled numbers and letters?

Thank you


There is no direct way that I know of to do that directly, (but I am no expert in AdvStringGrid, maybe there is a property out there that I am not aware of).

But personally, I would just fill the cells directly. You could add this code to the app:

 for var i := 0 to AdvGridWorkbook1.Sheets.Count - 1 do
    AdvGridWorkbook1.ActiveSheet := i;
    for var row := 1 to AdvGridWorkbook1.Grid.RowCount - 1 do
      AdvGridWorkbook1.Grid.Cells[0, row] := IntToStr(row);
    for var col := 1 to AdvGridWorkbook1.Grid.ColCount - 1 do
      AdvGridWorkbook1.Grid.Cells[col, 0] := TCellAddress.EncodeColumn(col);


This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.