Hi SoumyaGanapathi-8239,
First, you can use Microsoft.Office.Interop.Excel to create an excle. And then use Range.NumberFormat property to set the corresponding column to currency format.
Here is a simple you can refer to.
using Excel = Microsoft.Office.Interop.Excel;
Excel.Application xlApp = new Microsoft.Office.Interop.Excel.Application();
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;
object misValue = System.Reflection.Missing.Value;
xlWorkBook = xlApp.Workbooks.Add(misValue);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
xlWorkSheet.Cells[1, 1] = "ID";
xlWorkSheet.Cells[1, 2] = "NUMBER";
xlWorkSheet.Cells[2, 1] = "1";
xlWorkSheet.Cells[2, 2] = 123;
xlWorkSheet.Cells[3, 1] = "2";
xlWorkSheet.Cells[3, 2] = 333;
xlWorkSheet.Range["B2", "B3"].NumberFormat = "[$$-en-US] #,##0.00";
xlWorkBook.SaveAs(@"C:\Users\Desktop\csharp-Excel.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();
Best Regards,
Daniel Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.