Home > Back-end >  Through rapid export Excel TExcelQueryTable problem, please help me greatly
Through rapid export Excel TExcelQueryTable problem, please help me greatly

Time:10-27

I'm watching the TR boss as early as 2004, puts forward method of rapid export for http://borland.mblogger.cn/tr/posts/5722.aspx
But executive complains that "does not support the interface,,," etc.
What is this for?

Void __fastcall TForm1: : Button5Click (TObject * Sender)
{
String ConStr.
String SQL;
Int STick, ETick;
RangePtr R;
ExcelWorksheet2 - & gt; Activate ();
ConStr="ODBC; DSN=test; UID='sa'; The PWD='sa' ";
SQL="select top 1000 * from test".
R=ExcelWorksheet2 - & gt; Get_Range (Variant (" a1 "), the Variant (" a1 "));//here with the Variant transformation
STick=GetTickCount ();
ExcelQueryTable1 - & gt; ConnectTo (ExcelWorksheet2 - & gt; QueryTables - & gt; Add (Variant (ConStr), R, the Variant (SQL)));
ExcelQueryTable1 - & gt; The Refresh ();
ETick=GetTickCount ();
ShowMessage (FloatToStr ((ETick - STick)/1000.0) + "seconds");
}

CodePudding user response:

Or can give a bcb6.0 XLSReadWrite ah,,, why can't download any of the kinetic energy, on www.ccrun.com.
  • Related