Skip to sidebar Skip to content
Ipercube Technical
Jack of all trades, master of none
Date: Time: - Stardate:
Welcome, Log in by clicking  Here!
SS64
MDN
Stack
Code
GitHub
Wiki
Convert
V Studio
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions
Ipercube Technical
  • Home
  • VB Functions
    • Access Functions
    • Assembly Info
    • Color/Image Functions
    • Data Table Functions
    • Email Functions
    • Active Directory Functions
    • LDAP Functions
    • Excel Functions
    • Logging Functions
    • Source Code Retrieval
    • String Functions
    • Sql Functions
    • Object Utilities Functions
    • System and Utilities
    • Utility Forms
  • VB Classes
    • Environment Variables Helper
  • ABAP
    • ABAP Reports
    • ABAP HTTP Functions

Table Manipulation – Set ListObject Headers

Sets the header row of an Excel.ListObject using values from a CSV-formatted string.

The function splits the HeaderCSV string and assigns each value to the corresponding header cell in the list object’s header row. If the list object is Nothing , the function exits without changes.

VB
    Public Sub xlSetListObjectHeaders(ListObject As Excel.ListObject, 
                                      HeaderCSV As String, 
                                      Optional Separator As String = ";")

        If ListObject Is Nothing Then Return

        Dim arHeader As String() = Split(HeaderCSV, Separator)
        Dim iColIndex As Integer

        For Each szHeader As String In arHeader
            iColIndex += 1
            ListObject.HeaderRowRange.Cells(1, iColIndex).Value = szHeader
        Next

    End Sub

Posted by ipercube


© 2026 Ipercube Design