Prev: Server Check Health Script Needed
Next: call vbScript from vba or convert vbscript to vba(Access 2007)?
From: Kenneth A. Larsen on 27 Jul 2010 19:44 "john" <john(a)hotmail.nl> wrote in message news:2449b$4c235bf1$5ed32112$16390(a)cache1.tilbu1.nb.home.nl... > Can anybody help me with a script . > > I want to read the input file ( the file is a csv file ) in the script : > > > Inputfile : > 145,Windows Server 2003 > 487 Windows XP > 211,Windows 2000 > > > > Here is the script : > Const xlDataLabelsShowPercent = 2 '3 > > Set objExcel = CreateObject("Excel.Application") > objExcel.Visible = True > Set objWorkbook = objExcel.Workbooks.Add() > > Set objWorksheet = objWorkbook.Worksheets(1) > > objWorksheet.Cells(1,1) = "Operating System" > objWorksheet.Cells(2,1) = "Windows Server 2003" > objWorksheet.Cells(3,1) = "Windows XP" > objWorksheet.Cells(4,1) = "Windows 2000" > > > objWorksheet.Cells(1,2) = "Number of Computers" > objWorksheet.Cells(2,2) = 145 > objWorksheet.Cells(3,2) = 487 > objWorksheet.Cells(4,2) = 211 > > > Set objRange = objWorksheet.UsedRange > objRange.Select > > Set colCharts = objExcel.Charts > colCharts.Add() > > Set objChart = colCharts(1) > objChart.Activate > > objChart.ChartType = 70 '70 > objChart.Elevation = 30 '30 > objChart.Rotation = 80 '80 > > objChart.ApplyDataLabels xlDataLabelsShowPercent > > objChart.PlotArea.Fill.Visible = False 'true > objChart.PlotArea.Border.LineStyle = -4142 '-4142 > > objChart.SeriesCollection(1).DataLabels.Font.Size = 14 > objChart.SeriesCollection(1).DataLabels.Font.ColorIndex = 2 > ' /// END > > > can anybody help me with this script > > Thanks a lot > > John You're welcome! > > |