Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating totals on last row of spreadsheet
Message
From
07/01/2007 14:24:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
07/01/2007 14:02:50
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01183285
Message ID:
01183291
Views:
13
>How can I get a column total for columns 3 - 12 in a spreadsheet through automation. The number of rows is variable for each spreadsheet, however the columns are constant.
>
>I suppose I can calulate the totals and append a record to the table and then the totals will appear as the last entry when I add them to the worksheet. However I was looking for an automation type code.
>
>
>Any help appreciated
>Thanks
>Gaylen Jungling

Save a macro in Excel to insert the total, and look at it. You will get something like Selection.FormulaR1C1 = "=..." in some place is the number of rows, which will be variable - change that to "..." + trans(lnRowCount) + "...", assuming you saved the row count to that variable.
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
Reply
Map
View

Click here to load this message in the networking platform