* 0.2.10

* fix: example
main
bokuweb 2021-03-23 12:08:19 +09:00 committed by GitHub
parent 0b4d457b6e
commit 90d1e9a92c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

4
Cargo.lock generated
View File

@ -160,7 +160,7 @@ checksum = "0e25ea47919b1560c4e3b7fe0aaab9becf5b84a10325ddf7db0f0ba5e1026499"
[[package]]
name = "docx-rs"
version = "0.2.9"
version = "0.2.10"
dependencies = [
"image",
"insta",
@ -709,4 +709,4 @@ dependencies = [
"crc32fast",
"flate2",
"podio",
]
]

View File

@ -1,6 +1,6 @@
[package]
name = "docx-rs"
version = "0.2.9"
version = "0.2.10"
authors = ["bokuweb <bokuweb12@gmail.com>"]
repository = "https://github.com/bokuweb/docx-rs"
edition = "2018"

View File

@ -8,7 +8,8 @@ pub fn main() -> Result<(), DocxError> {
TableRow::new(vec![
TableCell::new()
.add_paragraph(Paragraph::new())
.grid_span(2),
.grid_span(2)
.shading(Shading::new().fill("FF0000")),
TableCell::new()
.add_paragraph(Paragraph::new().add_run(Run::new().add_text("Hello")))
.vertical_align(VAlignType::Center)
@ -35,6 +36,7 @@ pub fn main() -> Result<(), DocxError> {
]),
])
.set_grid(vec![2000, 2000, 2000])
.layout(TableLayoutType::Fixed)
.indent(1000);
Docx::new().add_table(table).build().pack(file)?;
Ok(())