mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
use column width adjustment as specified in standard so that width in Excel on Windows matches value in xlnt, #193
This commit is contained in:
parent
49b84a83c7
commit
4e2c0c0ffb
|
@ -490,7 +490,7 @@ std::string xlsx_consumer::read_worksheet_begin(const std::string &rel_id)
|
|||
|
||||
if (parser().attribute_present("width"))
|
||||
{
|
||||
width = parser().attribute<double>("width");
|
||||
width = (parser().attribute<double>("width") * 7 - 5) / 7;
|
||||
}
|
||||
|
||||
optional<std::size_t> column_style;
|
||||
|
|
|
@ -2138,7 +2138,7 @@ void xlsx_producer::write_worksheet(const relationship &rel)
|
|||
|
||||
if (props.width.is_set())
|
||||
{
|
||||
write_attribute("width", props.width.get());
|
||||
write_attribute("width", (props.width.get() * 7 + 5) / 7);
|
||||
}
|
||||
|
||||
if (props.custom_width)
|
||||
|
|
Loading…
Reference in New Issue
Block a user