Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Set the Width of an Excel Column
Message
From
02/09/2003 18:27:38
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00825508
Message ID:
00825510
Views:
17
>My mind has gone blank. How can I set the width of an Excel Column through Automation?

You have to set the width of a cell. The following is from one of my programs:
with oSheet
  .Cells(1,1).ColumnWidth = 6
  .Cells(1,2).ColumnWidth = 30
  ...
endwith
The above example sets the ColumnWidth of columns A and B. I prefer the RC (row-column) syntax, because it is easier to manipulate numbers than letters for columns.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform