Forum Discussion
roytberA
Occasional Contributor
Thank you Robert for your response.
I am going to try using DDT.ExcelDriver. The reason why I didn't use it before is because I have more than 48,000 rows in the excel sheet.
My question is how to use SQL statement in excelDriver?
Thanks
tristaanogre
6 years agoEsteemed Contributor
As mentioned, the DDT drivers are simply wrappers around ADO objects... so, the driver has a child object called ADOCommandObject which has a CommandText property. Set the CommandText to whatever you want to select the appropriate data.
function blah2(){ let myDriver = DDT.ExcelDriver('C:\\Temp\\test.xls', 'Sheet1', true); myDriver.ADOCommandObject.CommandText = 'SELECT * FROM [Sheet1$] where Column1 = "blah"'; }
See https://querysurge.zendesk.com/hc/en-us/articles/205766136-Writing-SQL-Queries-against-Excel-files for how to write queries against Excel sheets.
Related Content
- 5 years agoChristian_N_DK