This is what I've put together so far. It's not complete because there are several things I don't know, and I don't have the files to test with. I put a bunch of comments within the code that you can get rid of. I was just making suggestions or asking questions, because I'm pretty much shooting in the dark here.
AddReference "Microsoft.Office.Interop.Excel.dll"
Imports Microsoft.Office.Interop.Excel
Dim oXLFile As String = "C:\Temp\Excel File.xlsx"
Dim oSheet As String = "Sheet1"
Dim oExcel As New Microsoft.Office.Interop.Excel.ApplicationClass
oExcel.DisplayAlerts = False
oExcel.Visible = False
Dim oWB As Workbook = oExcel.Workbooks.Open(oXLFile)
Dim oWS As Worksheet = oWB.Worksheets.Item(oSheet)
Dim oCells As Range = oWS.Cells
'Assuming Rows 2 through 11 contain the needed data
'Assuming only the first cell in each row contains the needed data. I have no idea.
'Assiming their values are String type values
'If the values are supposed to be a different data type, you may need to change how the variables are defined
Dim oLine2 As String = oCells.Item(2, 1).Value
Dim oLine3 As String = oCells.Item(3, 1).Value
Dim oLine4 As String = oCells.Item(4, 1).Value
Dim oLine5 As String = oCells.Item(5, 1).Value
Dim oLine6 As String = oCells.Item(6, 1).Value
Dim oLine7 As String = oCells.Item(7, 1).Value
Dim oLine8 As String = oCells.Item(8, 1).Value
Dim oLine9 As String = oCells.Item(9, 1).Value
Dim oLine10 As String = oCells.Item(10, 1).Value
Dim oLine11 As String = oCells.Item(11, 1).Value
oWB.Close(False)
oExcel.Quit
oCells = Nothing
oWS = Nothing
oWB = Nothing
oExcel = Nothing
Dim oADoc As AssemblyDocument = ThisAssembly.Document
Dim oRefDoc As Document
Dim oCProps As PropertySet
Dim oAuto As IiLogicAutomation = iLogicVb.Automation
For Each oRefDoc In oADoc.AllReferencedDocuments
'You could just set this up so if it isn't the right document type & SubType it will just go to the next document, without messages.
If oRefDoc.DocumentType = DocumentTypeEnum.kAssemblyDocumentObject Then
MsgBox("This is an Assembly, so this can't be applied to it. Continuing.")
Continue For
ElseIf oRefDoc.DocumentType = DocumentTypeEnum.kPartDocumentObject Then
If oRefDoc.PropertySets.Item("Design Tracking Information").Item("Document SubType Name").Value <> "Sheet Metal" Then
MsgBox("This is a Part, but not a Sheet Metal Part, so this can't be applied to it. Continuing.")
Continue For
Else
'I assume by 'create variables within the document', you mean create custom iProperties within it?
oCProps = oRefDoc.PropertySets.Item("Inventor User Defined Properties")
'Check to see if those custom iProperties already exist
'If so, set their values to the new values from Excel
'If not, create new custom iProperties and set their values to the new values from Excel
'Check to see if the "TypePiece" custom iProperty exists
'If it does, use its value to determine the correct color for the model
'If it doesn't exist, let user know MsgBox(), then maybe create it.
oAuto.RunExternalRule(oRefDoc, "Z:\Inventor 2014\Gabarit_par_defaut\Paints")
'I assume this external iLogic rule is taking care of searching for the pre-existing 'variable' called "TypePiece", then changing the color accordingly?
'I'm not sure how you want to use the data from the Excel file here.
End If
End If
Next
Wesley Crihfield

(Not an Autodesk Employee)