Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Decimal places in excel
Message
From
25/09/2006 10:57:12
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01155911
Message ID:
01156922
Views:
29
You're welcome.
If you're doing that in a loop, keep in mind it'd be slower. Instead you might get whole column/row/area references and do just one call. ie: To apply to only Column 2 ("B") in whole sheet used area:

oleapp.activeworkbook.activesheet.UsedRange.Columns(2).NumberFormat = ...

Cetin

>tested, tried and trusted:) thanks Cetin, that was perfect.
>~M
>
>>Mark,
>>OleApp.cells.NumberFormat
>>
>>OleApp.cells means all cells.
>>
>>Instead of:
>>>
>>>OleApp.cells(lnCounter,3).Select   && selects the individual cell
>>>OleApp.cells.NumberFormat = "[$€-2] #,##0.00"   && change the format of cell
>>>
>>Try:
>>
>> OleApp.cells(lnCounter,3).NumberFormat = "[$€-2] #,##0.00"   && change the format of cell
>>
Cetin
>>
SNIP...
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform