usmanazizgroupdocs
4/17/2017 - 9:38 AM

Documents-GetHeaderFooterInformationExcel.vb

' For complete examples and data files, please go to https://github.com/groupdocs-watermark/GroupDocs.Watermark-for-.NET
Using doc As CellsDocument = Document.Load(Of CellsDocument)(Utilities.MapSourceFilePath(FilePath))
    For Each worksheet As CellsWorksheet In doc.Worksheets
        For Each headerFooter As CellsHeaderFooter In worksheet.HeadersFooters
            Console.WriteLine(headerFooter.HeaderFooterType)
            For Each section As CellsHeaderFooterSection In headerFooter.Sections
                Console.WriteLine(section.SectionType)
                If section.Image IsNot Nothing Then
                    Console.WriteLine(section.Image.Width)
                    Console.WriteLine(section.Image.Height)
                    Console.WriteLine(section.Image.GetBytes().Length)
                End If
                Console.WriteLine(section.Script)
            Next
        Next
    Next
End Using