I'm trying to dynamically create subtotals when
opening an excel spreadsheet from a web application.
Here is my code;
Set excelApp = createobject("excel.Application"
excelApp.Visible = True
excelApp.Workbooks.open("..//../../../Template.xls"
worksheet.activate
Set sheet = worksheet.Sheets(1)
sheet.Activate
set queryTables = sheet.querytables
set queryTable = queryTables.Add("data" , sheet.Range("A5")
queryTable.Name = "SurveyData"
queryTable.FieldNames = True
queryTable.RowNumbers = False
queryTable.FillAdjacentFormulas = False
queryTable.PreserveFormatting = True
queryTable.RefreshOnFileOpen = False
queryTable.BackgroundQuery = True
queryTable.RefreshStyle = xlInsertDeleteCells
queryTable.SavePassword = True
queryTable.SaveData = True
queryTable.AdjustColumnWidth = True
queryTable.RefreshPeriod = 0
queryTable.Refresh
//This is the code I got from the Excel Object Module(below)
sheet.Range.("A5".subtotal 1,xlSum, 7 ,false, true, xlsummarybelow
ANY help would be greatly appreciated.
Dewey
opening an excel spreadsheet from a web application.
Here is my code;
Set excelApp = createobject("excel.Application"
excelApp.Visible = True
excelApp.Workbooks.open("..//../../../Template.xls"
worksheet.activate
Set sheet = worksheet.Sheets(1)
sheet.Activate
set queryTables = sheet.querytables
set queryTable = queryTables.Add("data" , sheet.Range("A5")
queryTable.Name = "SurveyData"
queryTable.FieldNames = True
queryTable.RowNumbers = False
queryTable.FillAdjacentFormulas = False
queryTable.PreserveFormatting = True
queryTable.RefreshOnFileOpen = False
queryTable.BackgroundQuery = True
queryTable.RefreshStyle = xlInsertDeleteCells
queryTable.SavePassword = True
queryTable.SaveData = True
queryTable.AdjustColumnWidth = True
queryTable.RefreshPeriod = 0
queryTable.Refresh
//This is the code I got from the Excel Object Module(below)
sheet.Range.("A5".subtotal 1,xlSum, 7 ,false, true, xlsummarybelow
ANY help would be greatly appreciated.
Dewey