Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel with Multiple Worksheet
Message
From
10/01/2006 08:40:43
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
10/01/2006 00:04:14
General information
Forum:
Visual FoxPro
Category:
Third party products
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows Server 2003
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01085026
Message ID:
01085149
Views:
30
>>The following is from my class that manages Excel:
>>
>>
>>* Method: NextSheet
>>with This
>>	local loWorkbook
>>	loWorkbook = .oSheet.Parent
>>	.nActiveSheet = .nActiveSheet + 1
>>	if This.nActiveSheet > loWorkbook.Sheets.Count
>>		loWorkbook.Sheets.Add(NULL, loWorkbook.Sheets(loWorkbook.Sheets.Count))
>>		.oSheet = loWorkbook.ActiveSheet
>>	else
>>		.oSheet = loWorkbook.Sheets(This.nActiveSheet)
>>	endif
>>	.nRow = 1
>>	.nCol = 1
>>endwith
>>
>
>Hi Hilmar,
>
> thanks for your quick reply, i tried to incorporate this code but "Unknown Member oSheet" displayed on my screen?
>
>thanks

That is part of a larger class, and you have to adapt it.

.oSheet is a property of the class, which already points to a spreadsheet - as a result of previous Automation work. You can replace it with a variable, like loSheet, which also points to a spreadsheet.
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