xou/elixlsx

Wrong background set

Closed this issue · 3 comments

Trying to set cell background color like this:

rows = [ [ [5], [35], [235, bg_color: "#ffff00"]  ] ]
sheet  = %Sheet{rows: rows}
workbook = %Workbook{sheets: [sheet]}
{:ok, excel} =  Elixlsx.write_to(workbook, "example.xlsx")

In result getting 3-rd cell with white background, the rest cells have yellow background. Expecting an opposite result.

Which software you use to view the excel file?

Libre Office show the table without problems.
On Microsoft Office 2016 popup for repair the file is showing.

I will try to fix this next days.

I use Numbers on mac. I found an issue. In styles.xml

Instead of <fill /> (The first item in fills tag) it should be

<fill><patternFill patternType="none"/></fill>
xou commented

Closed in #14.