Hi all,
I want to export the data to excel using excel buffer concept. By stand , text will be left aligned and numeric will be right aligned. But I want always to follow the left alignment.
so I read one forum in mibuso and put the following code in excel buffer table.
XlWrkSht.Range(xlColID + xlRowID).HorizontalAlignment := HorzAlign;
but after I put this code , its still works the std way.
if anyone knows how to achieve the scenario, kindly let me know.
Thanks in advance,
Regards,
chandru.
0
Comments
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
I tried to assign the decimal to text using format but still I found that the alignment is not left aligned.
Thanks & Regards,
chandru.
Add the ' before the number as recommended and it will be treated as text.
Value:='''' + FORMAT(Number);
http://mibuso.com/blogs/davidmachanick/
i.e.
aDecimalVariable = Cstr(aDecimalVariable)
should treat the new value of 'aDecimalVariable' as a string.