Here you go. We switched cause we heard they SW was dropping Excel as well. Just wish SW's worked as good as Excel.
Side note. We do our boms from #1 on bottom. There is a data sort function in this code so your's might come in upside down.
Hope it works for you.
Option Explicit
Sub main()
Dim swApp As New SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swDraw As SldWorks.DrawingDoc
Dim swView As SldWorks.View
Dim swTable As SldWorks.TableAnnotation
Dim bRet As Boolean
'Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
Set swDraw = swModel
Set swView = swDraw.GetFirstView
Do While Not swView Is Nothing
Set swTable = swView.GetFirstTableAnnotation
Do While Not swTable Is Nothing
ProcessTable swApp, swModel, swTable
Set swTable = swTable.GetNext
Loop
Set swView = swView.GetNextView
Loop
End Sub
Sub ProcessTable _
(swApp As SldWorks.SldWorks, swModel As SldWorks.ModelDoc2, swTable As SldWorks.TableAnnotation)
Dim swAnn As SldWorks.Annotation
Dim nNumCol As Long
Dim nNumRow As Long
Dim i As Long
Dim j As Long
Set swAnn = swTable.GetAnnotation
nNumCol = swTable.ColumnCount
nNumRow = swTable.RowCount
' Show the name and type of table
' Debug.Print " " & swAnn.GetName & " <" & swTable.Type & ">"
' Get the table contents
For i = 0 To nNumRow - 1
For j = 0 To nNumCol - 1
Cells(i + 1, j + 1).Value = swTable.Text(i, j)
Next j
Next i
Range("A1

12").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub