Hi,
I am importing two dimension string array to the Excel and after data is imported I want to format some of the columns as date, some as currency, and some as numbers. Bellow is my current code, but it will not convert imported values to the desired format. This custom formatting will only work when I import object array. Is there any way to format string array?
string[,] objData = new string[20,4];
objData[0,0]=”100”;
objData[0,1]=” 5/2/2002 12:00:00 AM”;
objData[0,2]=” 500000”;
objData[0,3]=” Some text”;
objData[1,0]=........
….
objSheet.Cells.ImportTwoDimensionArray(objData,0,0);
objSheet.Cells.Columns[0].Style.Custom= "$###,##0.00;[Red]$###,##0.00";
objSheet.Cells.Columns[0].Style.Custom= “mm/dd/yyyy";
objSheet.Cells.Columns[0].Style.Custom= "###,##0;[Red]###,##0";
Thanks,
Aleksandra