Hi Everyone. I wasn't sure which forum to put this under, so please move if necessary.
I have an app that exports a data table to excel. This works, however, i have a column with currency that i can't get formatted properly.
IE: Right now it prints 24450.00 or 24000 if a whole number with no decimal places.
I have tried a lot of things, but this is what i have right now for my range and formatting. Below is a copy of the method. Please let me know where i am going wrong, because with this range and formatting, SOME of the numbers are showing up #######.
Below is my formatting code. What am i missing? It seems like it formats some based on the "$#,##0.00", but it doesn't work for them all.
How do i set everything to "Currency" like in the excel options? I have tried range.NumberFormat = "Currency" but that is invalid. Any help is appreciated.
Microsoft.Office.Interop.Excel._Application excel = new Microsoft.Office.Interop.Excel.ApplicationClass();
Microsoft.Office.Interop.Excel.Workbook wb = (Microsoft.Office.Interop.Excel.Workbook)excel.Workbooks.Add(System.Reflection.Missing.Value);
Microsoft.Office.Interop.Excel.Worksheet ws = (Microsoft.Office.In
View Complete Post