locked
Exporting Data to EXCEL RRS feed

  • Question

  • User-1051661789 posted

    Hello Everyone,

    I want to export data to a excel file. So i have binded the data to an data grid through a dataset and exported to excel file. My stored procedure is returning a value as 0011 but in the excel file it is displaying as 11. The preceeding 0's aer missing in the excel file. Following is the query which i am using and for AcctNum field data is coming as 0011 in database and 11 in excel

    SELECT TransNum, SeqNum, SiteId, Pump, ProdId, Qty AS ''Quantity'', PPG AS ''Price'', Odometer AS ''Odom'', MiscKB AS ''MiscKeyBoard'', AcctNum AS ''Account'', AcctName, DrvrName, VehcName FROM Table1

    Can anyone of you please let me know what i need to do to get value as 0011.

    SELECT TransNum, SeqNum, SiteId, Pump, ProdId, Qty AS ''Quantity'', PPG AS ''Price'', Odometer AS ''Odom'', MiscKB AS ''MiscKeyBoard'', AcctNum AS ''Account'', AcctName, DrvrName, VehcName FROM Table1 

     

    Thursday, March 11, 2010 5:54 AM

Answers

All replies