'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),1,Int(Rnd*100) Next
pivot.SetColumnNames "Employees","Categories","Number of orders","Sales" pivot.Finalize
pivot.LoadChartTemplate "column" pivot.ReplaceTag "title","My Column Chart With a Filter" pivot.ReplaceTag "bars","vertical" pivot.ReplaceTag "stacked","false" pivot.SaveChart folder & "column1.htm"
Set shell = CreateObject("Wscript.Shell") shell.Run folder & "column1.htm",1,False