Announcements
Hello, Im extracting a data table from excel, i need to make a group by Customer ID, Couldnt mange to make new data tables (per CustomerID)And i dont want to loop for each customer ID, Any tips.
Make a group? What do you mean?
I have query result, need to make gruopby CustomerID into samaller datatable that i can loop throw them.
You can treat Excel sheet as a database table and fire a query on it.
Below query will only return a datatable for this particular customer Id
Select * from [Sheet1$] where CustId = '123456'
Provider=Microsoft.ACE.OLEDB.12.0;Data Source="C:\Test\ExcelFileName.xlsx";Extended Properties="Excel 12.0;HDR=Yes;IMEX=1";
Do you know a syntax to reference named Excel table instead of an entire sheet?
Hi @Anonymous, I assume you are asking about the SQL syntax for a named Excel table. I don't think a direct Excel table name can be passed to the query.
But you can find out the last row and column and give a range as below.
Select [SrNo] from [Sheet1$A1:D20] AS [Table1] where [SrNo] >= 5
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
David_MA 258 Super User 2026 Season 2
trice602 198 Super User 2026 Season 2
11manish 136 Super User 2026 Season 2