ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   NumberFormat not working (https://www.excelbanter.com/excel-programming/394872-numberformat-not-working.html)

Mitsurugi

NumberFormat not working
 
In my C# interop code I'm setting the NumberFormat property in the following
manner:

((Range)workSheet.Cells[rowIndex, columnIndex]).NumberFormat = "#0.0000";

Unfortunately this format is not being used in the generated spreadsheet.

What's weird is that if go to the "Format Cells" dialog and select "Custom"
the format string I set in code has been added to the format list. It's as if
it's been defined, but not been applied to the actual cell.

Any ideas on what's going on?

-Thx


All times are GMT +1. The time now is 02:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com