HomeActive Query BuilderQuerying Excel

Querying Excel


Hi, is it possible to connect to Microsoft Excel 2003 with your component?
You can use provided OLE DB connector with sample connection string:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Book1.xls;Extended Properties="Excel 8.0;HDR=Yes;IMEX=1";

You can that is table metadata are acquired correctly, but no information about columns is acquired. Moreover MS Excel needs special handling of querying (table names with brackets) i.e.
SELECT * FROM [sheet1$]
so when you choose table from query designer, it should be surrounded with brackets

I've managed to implement column metadata acquire using EventMetadataProvider class, but have no idea on how to solve second problem. Any advice?
Thanks in advance
Michał Bryłka | email
April 24 2009, 11:46 AM
Hi,

Have you set the syntax provider to MS Access?

Using the .NET, VCL and Java Editions, you should assign an instance of MS Access syntax provider to the QueryBuilder's SyntaxProvider property.

ActiveX control has the SQLSyntax property for this purpose.
Sergey Smagin | email
2 days, 15 hours since original post
This topic is closed