Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Changing Column width in Excel Object from VFP
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00176316
Message ID:
00176334
Views:
25
Russell: It's pretty easy.
tmpsheet = getObject('','excel.application')
XLApp = tmpsheet.application

XLApp.workbooks.Open(cFile)

WITH XLApp
** Sets Boldface for the top row
   .Rows("1:1").Select
   .Selection.Font.Bold = .T.

**Sets the D column to 36
   .Columns("D:D").Select
   .Selection.ColumnWidth = 36
ENDWITH
The easiest way to get the syntax is to do what you want with a macro open, then edit the macro and look at the code.

HTH
Barbara


>After Creating an Excel Workbook and filling in some data, how do I change Column widths?
Barbara Paltiel, Paltiel Inc.
Previous
Reply
Map
View

Click here to load this message in the networking platform