Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy to blah.xls type xl5 loses column widths
Message
From
01/03/2005 02:19:31
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
00991053
Message ID:
00991455
Views:
26
Hi Evan

I've had the same problem, so now I copy the file to xl5 then use this code to extend the date field :

********* modify excel files column width
oXL = CREATEOBJECT( [Excel.Application] )
lcXlFile = "name of excel file"
oWb = oXL.Workbooks.Open( lcXlFile )
oSheet = oWb.ActiveSheet
oSheet.columns( "A:A" ).columnWidth = 9.2
osheet.Columns( "A:A" ).NumberFormat = "m/d/yyyy"
oWb.Save()
oXL.Quit()

This fixes the date width problem. Hope this helps.

Shafid
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform