Ben Weissman loads an Excel file with Biml:
Did you know, that you could call GetDatabaseSchema on Excel files? You can!
Just define an ExcelConnection first:
01_Environment.biml 123456789101112<Bimlxmlns="http://schemas.varigence.com/biml.xsd"><Connections><ExcelConnectionName="MyExcel"ConnectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Flatfiles\XLS\MyExcel.xlsx;Extended Properties="Excel 12.0 XML;HDR=YES";"/><OleDbConnectionName="Target"ConnectionString="Data Source=localhost;initial catalog=MySimpleBiml_Destination;provider=SQLNCLI11;integrated security=SSPI"></OleDbConnection></Connections><Databases><DatabaseName="MySimpleBiml_Destination"ConnectionName="Target"></Database></Databases><Schemas><SchemaName="dbo"DatabaseName="MySimpleBiml_Destination"></Schema></Schemas></Biml>You can call GetDatabaseSchema on that connection and loop through the tables just like any regular database.
Click through to see what to do with this connection.