Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel Automation
Message
From
15/07/1999 19:38:44
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Excel Automation
Miscellaneous
Thread ID:
00242078
Message ID:
00242078
Views:
57
I made a little automation program to adjust column widths properties. This is the Code.

uTMP = GetObject('ResulQAS12.XLS')
oXLSApp = uTMP.application

oXLHoja = oXLSApp.workbooks(1).WorkSheets(1)

oXLHoja.Columns("A:A").EntireColumn.AutoFit
oXLHoja.Columns("B:B").EntireColumn.AutoFit
oXLHoja.Columns("C:C").EntireColumn.AutoFit
oXLHoja.Columns("D:D").EntireColumn.AutoFit

oXLSApp.workbooks(1).Save
oXLSApp.workbooks(1).Close

My problems is that it is now endlessly invisible, If I open it from Excel I can see the Ready prompt at the status bar. I’m sure it is open because when I try to open again the same file I receive the ‘Read Only’ warning. Excel does not show any signs of having this file opened.

Any tips to solve my problem and improve this code are welcome.

Regards

Oscar
Next
Reply
Map
View

Click here to load this message in the networking platform