Create a Pivot Column Chart (with a filter and series)
' Create a Pivot Column Chart (with a filter and series) ' using Vbsedit's free Toolkit Set pivot = CreateObject ( "Vbsedit.PivotTable" ) pivot.Initialize 3 , 1 folder =Left ( WScript.ScriptFullName , InStrRev ( WScript.ScriptFullName , "\" )) name =Array ( "Nancy" , "Andrew" , "Janet" , "Margaret" , "Steven" , "Michael" , "Robert" , "Laura" , "Anne" ) category =Array ( "Beverages" , "Condiments" , "Confections" , "Dairy Products" , "Grains/Cereals" , "Meat/Poultry" , "Produce" , "Seafood" ) 'Generates 100000 lines of random data For i = 0 to 100000 n = Int ((UBound (name ) + 1 ) * Rnd ) c = Int ((UBound (category ) + 1 ) * Rnd ) pivot.Add name (n ),category (c ), 2005 + Int ( 12 *Rnd ),Int (Rnd * 10 ) Next pivot.SetColumnNames "Employees" , "Categories" , "Year" , "Sales" pivot.Finalize 'pivot.SaveToFile folder & "pivot1.piv" pivot.LoadChartTemplate "column" pivot.ReplaceTag "title" , "My Column Chart With Series" pivot.ReplaceTag "bars" , "vertical" pivot.ReplaceTag "stacked" , "false" pivot.SaveChart folder & "column2.htm" Set shell = CreateObject ( "Wscript.Shell" ) shell.Run folder & "column2.htm" , 1 , False
VbsEdit contains all these sample scripts!
Download
Home
Scripts
Copyright © 2001-2025 adersο ft