AddFlexTable and zero margin in a word document table

Skip to first unread message


May 12, 2017, 4:32:33 PM5/12/17
to ReporteRs

I am computing a nice and quite large table in Word with ReporteRs library using these lines:

dataParProp = parProperties(padding= 0, text.align = "center")
resultFT = FlexTable(dataframe,
                         body.text.props = textProperties(font.size=7),
                         body.cell.props = cellProperties( = 'none'),
                         body.par.props = dataParProp, 
                         header.par.props = dataParProp )
doc = addFlexTable( doc , flextable = resultFT, bookmark = "BOOKMARK")

My FlexTable "resultFT" looks very neat and optmised in terms of space with zero padding in each cell.
However, in my word output "doc", my table has a margin of 0.19 cm on the left and on the right side of each cell (instead of 0cm)....

I tried the following options directly in the addFlexTable but I could not see any change in the word output:
doc = addFlexTable( doc , flextable = resultFT, bookmark = "BOOKMARK", = parProperties(padding.left = 0, padding.right = 0))

Am I missing something?
Or is it not possible to have a zero margin in a FlexTable in a Word document?

Many thanks in advance!

John Vida

Jun 2, 2017, 2:44:29 PM6/2/17
to ReporteRs
Hi Lore, 

padding in parproperties wont change margins. It is for paragraph padding between lines. If you want to change margins, load a custom template with margins you like. 
Reply all
Reply to author
0 new messages