Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation and Formatting Cells (Columns)
Message
From
16/10/2002 04:19:04
 
 
General information
Forum:
Visual FoxPro
Category:
Third party products
Miscellaneous
Thread ID:
00710938
Message ID:
00711606
Views:
7
>Does anyone have a code example of formatting a cell through automation?
>
>I create spread sheets through automation and unfortunately, some columns have numbers with leading zeros. The leading zeros are removed unless I change category to text in the Format Cells dialog.
>
>Thanx.

Hi Fred
I posted one small Excel automation class in download section here on UT.
It is called 'rep2excel' and is posted 26 of september.
Full source is provided - so I guess you can find some examples of how to do that.
Class itself can perform such thing by issuing code like this;
oXl.make_cell_format(nSheet,nRow,nCol,cFormat)
where cFormat is one of these funny excel format strings
and nSheet,nRow,nCol numeric cell coordinates

and then you can issue
oXl.make_cell(nSheet,nRow,nCol,vValue)

Hope this can help you.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform