Download Vbsedit to get sample files

' Create a Pivot Chart Without Excel
' using Vbsedit's free Toolkit

Dim fso
Set fso = WScript.CreateObject("Scripting.Filesystemobject")

Set shell = CreateObject( "WScript.Shell" )
folder=shell.ExpandEnvironmentStrings("%LOCALAPPDATA%") & "\Adersoft\Vbsedit\Resources\"

Set f = fso.OpenTextFile(folder & "pivot.csv",1)
header = f.ReadLine

Set pivot = CreateObject("Vbsedit.PivotTable")
pivot.Initialize3,2

DoWhileNot(f.AtEndOfStream)
  line = f.ReadLine
  arr = Split(line,";")
  pivot.Add arr(0),arr(1),arr(2),Replace(arr(3),".",","),Replace(arr(4),".",",")
Loop

pivot.SetColumnNames"Name","Category","Date","Value1","Value2"

pivot.Finalize

pivot.LoadChartTemplate"column"
pivot.ReplaceTag"title","My Column Chart"
pivot.ReplaceTag"bars","vertical"
pivot.ReplaceTag"stacked","false"
pivot.SaveChart folder & "column.htm"

shell.Run folder & "column.htm",1,False


search for scripts

VbsEdit contains all these sample scripts!





Home   Scripts

Copyright © 2001-2019 adersοft