parent
0b4d457b6e
commit
90d1e9a92c
|
@ -160,7 +160,7 @@ checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "docx-rs"
|
name = "docx-rs"
|
||||||
version = "0.2.9"
|
version = "0.2.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"image",
|
"image",
|
||||||
"insta",
|
"insta",
|
||||||
|
@ -709,4 +709,4 @@ dependencies = [
|
||||||
"crc32fast",
|
"crc32fast",
|
||||||
"flate2",
|
"flate2",
|
||||||
"podio",
|
"podio",
|
||||||
]
|
]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "docx-rs"
|
name = "docx-rs"
|
||||||
version = "0.2.9"
|
version = "0.2.10"
|
||||||
authors = ["bokuweb <bokuweb12@gmail.com>"]
|
authors = ["bokuweb <bokuweb12@gmail.com>"]
|
||||||
repository = "https://github.com/bokuweb/docx-rs"
|
repository = "https://github.com/bokuweb/docx-rs"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
|
@ -8,7 +8,8 @@ pub fn main() -> Result<(), DocxError> {
|
||||||
TableRow::new(vec![
|
TableRow::new(vec![
|
||||||
TableCell::new()
|
TableCell::new()
|
||||||
.add_paragraph(Paragraph::new())
|
.add_paragraph(Paragraph::new())
|
||||||
.grid_span(2),
|
.grid_span(2)
|
||||||
|
.shading(Shading::new().fill("FF0000")),
|
||||||
TableCell::new()
|
TableCell::new()
|
||||||
.add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello")))
|
.add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello")))
|
||||||
.vertical_align(VAlignType::Center)
|
.vertical_align(VAlignType::Center)
|
||||||
|
@ -35,6 +36,7 @@ pub fn main() -> Result<(), DocxError> {
|
||||||
]),
|
]),
|
||||||
])
|
])
|
||||||
.set_grid(vec![2000, 2000, 2000])
|
.set_grid(vec![2000, 2000, 2000])
|
||||||
|
.layout(TableLayoutType::Fixed)
|
||||||
.indent(1000);
|
.indent(1000);
|
||||||
Docx::new().add_table(table).build().pack(file)?;
|
Docx::new().add_table(table).build().pack(file)?;
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|
Loading…
Reference in New Issue