简体   繁体   English

更改 flextable 中的单元格值

[英]change a cell value in a flextable

Is-there a way to change a value in a flextable?有没有办法更改 flextable 中的值? in version 0.4.7.003 it was possible to do it like this (this doesn't work anymore in 0.5.1):在 0.4.7.003 版本中,可以这样做(这在 0.5.1 中不再起作用):

library(flextable)
ft <- flextable( head( iris ))
ft$body$dataset[2,5] <- 'XXXXXXXX'
ft

You can use the function flextable::compose :您可以使用函数flextable::compose

library(flextable)
ft <- flextable( head( iris ))
ft <- compose(ft, i = 2, j = 5, as_paragraph(as_chunk('XXXXXXXX')))
ft

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM