I've been using NPOI (1.2.5) for a while to make XLS files, and I recently discovered the NPOI 2.0.6 which I would like to use to build DOCX files from scratch.
I've been looking for a XWPF styled table example, and found very little, I got the example Simple Table working, and found a styled Table example from POI, but calling, <tcpr.tcPrChange = new CT_TcPrChange();> whether, I make any additional calls to the tcpr object or not (<tcpr.AddNewShd().fill = "A7BFDE";>), causes the Table to render BADLY (WHOLE CELL IS BLACK). I would like to change the fill color:
tcpr.tcPrChange = new CT_TcPrChange();
tcpr.AddNewShd().fill = "A7BFDE";
The following is a summary of my success and failures:
XWPF Success:
If so, where can I find example code for each?
Thanks
I've been looking for a XWPF styled table example, and found very little, I got the example Simple Table working, and found a styled Table example from POI, but calling, <tcpr.tcPrChange = new CT_TcPrChange();> whether, I make any additional calls to the tcpr object or not (<tcpr.AddNewShd().fill = "A7BFDE";>), causes the Table to render BADLY (WHOLE CELL IS BLACK). I would like to change the fill color:
tcpr.tcPrChange = new CT_TcPrChange();
tcpr.AddNewShd().fill = "A7BFDE";
The following is a summary of my success and failures:
XWPF Success:
- Create Paragraphs
- Set Font-Family
- Set Font-Size
- Set Font-Bold
- Set Text
- Set Run-Color
- Create Table
- Access Table-Cell-Paragraph
- Create Runs in Table-Cells
-
SetInsideVBorder & SetInsideHBorder
- AddPicture
- Set Table-Width
- Set Table-Column-Width
- Set Table-Row-Height
- Set Table-Cell-Background-Color
- Set Table-SetOutsideVBorder & Table-SetOutsideHBorder
- Set Page-Header/Footer
-
Set Page-Orientation-Landscape (maybe not event supported in POI yet?)
If so, where can I find example code for each?
Thanks