Board index » delphi » Publishing data on an Excel sheet through COM

Publishing data on an Excel sheet through COM

Hello,

Does anyone have an idea to #efficiently# fill an Excel sheet with data
(including styles) originating from a 3rd party grid?
So far what I've come up with is setting the data+styles to each Excel cell
individually, which is too slow.

Thanks in advance,

 

Re:Publishing data on an Excel sheet through COM


<<Elad:
Does anyone have an idea to #efficiently# fill an Excel
sheet with data (including styles) originating from a 3rd
party grid?

Quote

Putting the data in quickly is quite easy. You can either
create a CSV file (the TStrings.CommaText property is very
handy), and use Excel's OpenText method to open it, or put
the data in a variant array which you assign to a ragne of
a worksheet in one go. There's no similar way of doing
styles - you'd have to work out the most efficient use of
ranges to change these yourself.

--
Deborah Pate

Other Threads