ClosedXML / ClosedXML/ClosedXML
Small columns are not as small as they should be
- Dominant language
- C#
- Stars
- 5.7k
- Forks
- 933
- Avg merge
- 12h 14m
- Merged PRs (30d)
- 1
Description
**Do you want to request a *feature* or report a *bug*?**
- [x] Bug
**Setting column width to 0.01 in ClosedXml results in 0.42(cm?) column width in Excel.**
**What is the expected behavior or new feature?**
Expected behaviour would be that columns will become smaller in Excel than they actually are when setting 0.002 as Width.
**Did this work in previous versions of our tool? Which versions?**
Not tested.
- [x] I attached a sample spreadsheet. (You can drag files on to this issue)
[ColumnWidthProblem.xlsx](https://github.com/ClosedXML/ClosedXML/files/976168/ColumnWidthProblem.xlsx)
**Code to reproduce problem:**
```c#
milestoneSheet.Column(columnCounter).Width = 0.002;
```
Contributor guide
Research direction
Start by reproducing the issue with the provided ColumnWidthProblem.xlsx sample and the C# assignment milestoneSheet.Column(columnCounter).Width = 0.002. Trace how ClosedXML converts and writes the column width, then verify in Excel that the resulting column is smaller than the reported 0.42 cm and matches the requested width.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100