Percentage formatting issue

so I have a template with different color and formatting. I am importing data from database using C# and loading it into the template. all the columns are loading ok except for the percentage column.
It would wipe out all the formatting for the entire column. Any idea how to fix?

I am using SetCellValue to set the value.

nvm I found the problem.
please delete


What is the exact call to SetCellValue?
I've just tried it with this code:
            XlsFile xls = new XlsFile("r:\test.xlsx", true);
            xls.SetCellValue(1, 1, 0.7);


Where test is a file which has in A1 a cell formatted with % and it keeps being this way after calling setcellvalue.

Now, there is an overload for SetCellValue which sets both the value and the format of the cell at the same time, this is why I ask for the exact call to SetCellValue that you are using. 
If you are using something like:
xls.SetCellValue(row, col, value, XF), then the XF last parameter is setting the format of the cell, and overwriting whatever you had in there.

ok, I just saw the new post after I wrote the answer. I am glad you could make it work :)