I have a problem with formatting text as %. Example:
Worksheet.Cells["B6"].Value = "15";
Worksheet.Cells["B6"].Style.Numberformat.Format = "0%";
When I open document done by code above the text in B6 is aligned to the left, there is a message like "The number in this cell is formatted as text or preceded by an apostrophe". A chart which uses this value draws incorrectly. When
I double-click the cell (when open in Excel) the formatting is ok. What's interesting when the value is set by a formula, then the formatting is ok. Any clue what am I doing wrong?