Hi WP,
I've been spending the last couple of evenings trying to get a shortened version of my program running, along with your code, but without success. If I run your code in a brand new project on its own, I can get it to compile just fine on its own, and it will execute all the way to the very end. but as soon as it reaches the end of the procedure (line 35 in your example) it crashes and the program never recovers. Granted I have monitored how fast it is, and it is very fast cycling through all the rows/columns, but then it crashes on exit. Note I am running no other code other than what you have given me here. I have also tried adding a TsWorksheetGrid object on my form and commenting out the " book := TsWorkbook.Create" (and .free) but it still does not work.
I can't see how it is different from my actual application program, which never crashes, but is very very slow writing all columns/rows. Note if I remove the book := tblProperties reference in my actual program, and then use the " book := TsWorkbook.Create" it again writes all the rows/columns very quickly, but then nothing appears in the grid on my form!! Very frustrating, as I just cannot see why your original program here just crashes on me all the time, yet my vastly more complicated program does not.
How do I make sure my workbook is attached to tblProperties? I see in my TsWorksheetGrid properties, that WorkbookSource is always "tblProperties.internal". there are no other options, so I don't know whether my book connects to the grid properly.
In terms of the automatic row height calculations slowing things down (that you mentioned) how do I avoid that? Note I am using same size font for my entire table.
Should the program example of yours that you sent 23rd April be able to run autonomously, or will it still need TsWorkSheetGrid component on the form? My only option right now seems to be to zip up my entire application and send that to you, as I am unable to get the simple (project) program working without crashing!