File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed
Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ <#
2+ . SYNOPSIS
3+ Gets Table Header
4+ . DESCRIPTION
5+ Gets Table Row that are header rows.
6+ #>
7+ foreach ($row in $this.tr ) {
8+ if (-not $row.trPr.psobject.properties ) { continue }
9+ if (-not $row.trPr.psobject.properties [' tblHeader' ]) { continue }
10+
11+ if ($row.pstypenames -ne ' OpenXML.Word.TableRow' ) {
12+ $row.pstypenames.insert (0 , ' OpenXML.Word.TableRow' )
13+ }
14+ if ($row.pstypenames -ne ' OpenXML.Word.TableHeader' ) {
15+ $row.pstypenames.insert (0 , ' OpenXML.Word.TableHeader' )
16+ }
17+ if (-not $row.FilePath ) {
18+ $row.psobject.properties.add (
19+ [psnoteproperty ]::new(" FilePath" , $this.FilePath ), $false
20+ )
21+ }
22+ if (-not $row.OpenXML ) {
23+ $row.psobject.properties.add (
24+ [psnoteproperty ]::new(" OpenXML" , $this.OpenXML ), $false
25+ )
26+ }
27+ if (-not $row.Table ) {
28+ $row.psobject.properties.add (
29+ [psnoteproperty ]::new(" Table" , $this ), $false
30+ )
31+ }
32+
33+ $row
34+ }
You can’t perform that action at this time.
0 commit comments