Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default How to do selection.subtotal in VBScript/ASP ?

I need to run subtotals on an excel sheet from an ASP
page. I'm able to create the page and populate it with
data, but I can not figure out how to subtotal.

When I created a macro, the VB line was the following:
Selection.Subtotal GroupBy:=5, Function:=xlSum,
TotalList:=Array(10, 12, 13 _
), Replace:=True, PageBreaks:=False,
SummaryBelowData:=True

This line creates an error in the ASP page, and I read
that I should remove the names and := suymbols. This
gave me the following line:
..Selection.Subtotal 5, xlSum, Array(10, 12, 13, 16, 18,
21, 24, 27), True, False, True

This line does not create an error, but it doesn't
subtotal either, it just cuases the browser to hang.

I read how to do this in Fox Pro, so I assume their is a
way to handle it in VB Script.

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to do selection.subtotal in VBScript/ASP ?

Try replacing xlSum with its value -4157

--
Regards,
Tom Ogilvy

"Wes" wrote in message
...
I need to run subtotals on an excel sheet from an ASP
page. I'm able to create the page and populate it with
data, but I can not figure out how to subtotal.

When I created a macro, the VB line was the following:
Selection.Subtotal GroupBy:=5, Function:=xlSum,
TotalList:=Array(10, 12, 13 _
), Replace:=True, PageBreaks:=False,
SummaryBelowData:=True

This line creates an error in the ASP page, and I read
that I should remove the names and := suymbols. This
gave me the following line:
.Selection.Subtotal 5, xlSum, Array(10, 12, 13, 16, 18,
21, 24, 27), True, False, True

This line does not create an error, but it doesn't
subtotal either, it just cuases the browser to hang.

I read how to do this in Fox Pro, so I assume their is a
way to handle it in VB Script.

Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default How to do selection.subtotal in VBScript/ASP ?

Already tried that, same result. Thanks for the reply
tho! I'm also having trouble setting the printer
orientation. Is their a good website for excel
automation through asp?


-----Original Message-----
Try replacing xlSum with its value -4157

--
Regards,
Tom Ogilvy

"Wes" wrote in

message
...
I need to run subtotals on an excel sheet from an ASP
page. I'm able to create the page and populate it with
data, but I can not figure out how to subtotal.

When I created a macro, the VB line was the following:
Selection.Subtotal GroupBy:=5, Function:=xlSum,
TotalList:=Array(10, 12, 13 _
), Replace:=True, PageBreaks:=False,
SummaryBelowData:=True

This line creates an error in the ASP page, and I read
that I should remove the names and := suymbols. This
gave me the following line:
.Selection.Subtotal 5, xlSum, Array(10, 12, 13, 16, 18,
21, 24, 27), True, False, True

This line does not create an error, but it doesn't
subtotal either, it just cuases the browser to hang.

I read how to do this in Fox Pro, so I assume their is

a
way to handle it in VB Script.

Thanks!



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to do selection.subtotal in VBScript/ASP ?

I don't know anything about asp, but my understanding is that you use
automation from ASP (through vbscript) same as you would from VB or word or
access or vbscript itself (as examples). If so:


http://support.microsoft.com/?id=167223
Microsoft Office 97 Automation Help File Available on MSL

http://support.microsoft.com/support...aqVBOffice.asp
Frequently Asked Questions about Microsoft Office Automation Using Visual
Basic


http://support.microsoft.com/support...fdevinapps.asp
Programming Office from Within Office

http://support.microsoft.com/support...dev/iisfaq.asp
Integrating Office with IIS FAQ

http://support.microsoft.com/?id=219151
Q219151 - HOWTO: Automate Excel 97 and Excel 2000 from Visual Basic

http://support.microsoft.com/support...automation.asp
Using Automation with Microsoft Excel 97

http://support.microsoft.com/?id=234774
HOWTO: Automate Excel from an HTML Web Page Using JScript

http://support.microsoft.com/?id=198703
HOWTO: Automating Excel From Client-Side VBScript

--
But both of your problems sound like they could stem from using xlconstants
that are undefined at runtime. xlsum appears to have a value of zero since
you don't have a reference to the xl object library where the constant is
defined. However, if you have tried hard coding the constant and are using
positional arguments and it still doesn't work, then I can't say.

--
Regards,
Tom Ogilvy



wrote in message
...
Already tried that, same result. Thanks for the reply
tho! I'm also having trouble setting the printer
orientation. Is their a good website for excel
automation through asp?


-----Original Message-----
Try replacing xlSum with its value -4157

--
Regards,
Tom Ogilvy

"Wes" wrote in

message
...
I need to run subtotals on an excel sheet from an ASP
page. I'm able to create the page and populate it with
data, but I can not figure out how to subtotal.

When I created a macro, the VB line was the following:
Selection.Subtotal GroupBy:=5, Function:=xlSum,
TotalList:=Array(10, 12, 13 _
), Replace:=True, PageBreaks:=False,
SummaryBelowData:=True

This line creates an error in the ASP page, and I read
that I should remove the names and := suymbols. This
gave me the following line:
.Selection.Subtotal 5, xlSum, Array(10, 12, 13, 16, 18,
21, 24, 27), True, False, True

This line does not create an error, but it doesn't
subtotal either, it just cuases the browser to hang.

I read how to do this in Fox Pro, so I assume their is

a
way to handle it in VB Script.

Thanks!



.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SUBTOTAL - dynamic selection Totteridge Ram Excel Worksheet Functions 3 December 17th 08 01:09 AM
Run VBScript from Excel Amy M Excel Discussion (Misc queries) 4 September 19th 08 09:07 PM
Anoth vbscript question ... sorry ! Sean Setting up and Configuration of Excel 1 March 20th 08 09:22 PM
Subtotal line selection Jenny Excel Discussion (Misc queries) 1 April 13th 05 02:21 PM
How to move worksheet from vbscript Robert Stober Excel Programming 1 October 9th 03 10:19 AM


All times are GMT +1. The time now is 06:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"