Fantastic. I did it like so:
Dim oMatrix As SAPbouiCOM.Matrix = Nothing
Dim oCol As SAPbouiCOM.Column = Nothing
Try
oMatrix = Me.m_oForm.Items.Item(CONSTANTS.SALES_ORDERS_MATRIX).Specific
Dim sCols As New StringBuilder
sCols.AppendLine("Numeric Index, Unique ID, TableName, Database Alias")
For iCol As Integer = 0 To oMatrix.Columns.Count - 1
oCol = oMatrix.Columns.Item(iCol)
sCols.AppendLine(iCol.ToString & "," & oCol.UniqueID & "," & oCol.DataBind.TableName & "," & oCol.DataBind.Alias)
Next
Using sWriter As New StreamWriter("h:\temp\SalesOrderMatrixColumns.csv")
sWriter.Write(sCols.ToString)
End Using
Catch ex As Exception
Me.AddOnApp.SBO_Application.MessageBox("Error in Test button code: " & ex.Message)
Finally
NewSharedMethods.releaseCOMobject(oMatrix)
NewSharedMethods.releaseCOMobject(oCol)
End Try
And got a nice CSV with all sorts of information. This will be very helpful in the future. Thanks Edy!