Click here to Skip to main content
15,911,035 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Sir,
I m Converting data in sqlserver to excel file when the report is generating all numbers are coming right aligned so that it is taking lots of space I want it to be center or left aligned so that when I print page it shouldn't go beyond that page

my table in sqlserver2005

Sr.No. Date EndTime StartTime Project Module Form WorkType Status Remarks
1 12/12/2011 09:30 10:30 ABBank PIS MasterForm Coding 50% ok

all numbers are coming right aligned how to set it left or center I m doing by use of gridview all data comes in dt then that dt convert to excel

Please Guide me
Posted
Comments
thatraja 16-Dec-11 3:08am    
In report? which one? SSRS? Crystal?
Prashant Srivastava LKO 16-Dec-11 3:53am    
It is in excel sir
Prashant Srivastava LKO 16-Dec-11 3:55am    
Direct conversion of Grid to excel

1 solution

This has nothing to do with SQL - it is just returning a numeric value which is being formatted for presentation by whatever display software you are using. Look at how the display element works - you say it is converted to Excel, which automatically right formats numeric values for presentation, so you need to look at how that section of your code is working. Since we don't know how you are displaying the data, we can't give you a specific solution.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900