This project has moved and is read-only. For the latest updates, please go here.

Bug with worksheet2.Column(1).Style.Numberformat.Format

Jan 12, 2012 at 9:19 PM
Edited Jan 12, 2012 at 9:21 PM

I am loving this library so far, but I think I have encountered a bug. I have a large spreadsheet (3 worksheets; with approx 250 columns in each sheet; 5000 rows per sheet).

I am using the function worksheet2.Column(currencycolumns[i]).Style.Numberformat.Format = "m/d/yyyy";

But what I find is that even though I only format certain columns, many other columns get affected. Is this a known issue? Are there any workarounds to this, other than hard-coding the format for every single column?

Here is the exact code I am using:

//It's basically looping through a number of columns and setting their format to Date.

int[] datecolumns = new int[] {17,19,21,23,26,28,30,77,84,93,102,110,139,140,144,185,186,187,188,220,224,226,228  };                for (i = 0; i <= datecolumns.Length - 1; i++)                {                    worksheet3.Column(datecolumns[i]).Style.Numberformat.Format = "m/d/yyyy";                }




Jan 31, 2012 at 6:56 PM

This should be fixed in version 3.0