Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How can I export a TStringGrid into MS Excel?

Excel export MS
0
Posted

How can I export a TStringGrid into MS Excel?

0

• you must create a SMEStringGridDataEngine component from SMExport+ page • define StringGrid property of this component (just select a desired control which you want to export) • any export component (from SMExport page of palette) have a new DataEngine property – select in the ObjectInspector your created SMEStringGridDataEngine component • switch a ColumnSource property of export component to csDataEngine (default value is csDBGrid) • customize proprties of export and just call Execute method It’s all. The same method is available for any other control (not a StringGrid) – just create another dataengine (TSMEListViewDataEngine, TSMEwwDBGridDataEngine, TSMEStringsDataEngine etc) If you haven’t any VCL control and want to “prepare” a data in events, you can use TSMEVirtualDataEngine and “navigate” thru your “data” in the events of this component (OnFirst/OnNext/OnGetValue etc) I developed small demo which can be downloaded at http://www.scalabium.com/download/sme/sme_sg2xls.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123