Manoj S  Pant

Manoj S Pant

  • NA
  • 1k
  • 1.1m

Currency symbol in Excel File from VB.net code

Sep 16 2014 5:55 AM

I am creating a excel file from VB.net code .

  1. Using Microsoft.Office.Interop.Excel .
  2. Using ADODB.Recordset .

I am creating ADODB.Recordset object and fill this recordset with vb.net datatable, which we pull from SQL server database.

After creating this recordset( which having Fields with datatype like ADODB.DataTypeEnum.adCurrency, ADODB.DataTypeEnum.adDate etc inside record set which we created manually inside code by comparing datetype of VB.net datatable like "System.DateTime" and "System.Decimal").

after that we copy this recordset by CopyFromRecordset() of Range class function and we get the Excel File with rows and columns .

Now I need to display currency symbol on excel file for records of "ADODB.DataTypeEnum.adCurrency" or "System.Decimal" type records, So what setting or property, need to place from code behind .