脚本作用:在d盘根目录下创建test.xsl 文件,A1,A2 分别写入:Tom,Sohu 并分别为其创建超链接:http://www.tom.com
Sub ReportInformation(filename)
Set ExcelObj = CreateObject("Excel.Application")
ExcelObj.Workbooks.Add
Set NewSheet = ExcelObj.Sheets.Item(1)
NewSheet.Name = "Page Information"
NewSheet.Cells(1,1).Value = "Tom"
NewSheet.Cells(2,1).Value = "Sohu"
NewSheet.Hyperlinks.Add NewSheet.Cells(1,1), "http://www.tom.com/"
NewSheet.Hyperlinks.Add NewSheet.Cells(2,1), "http://www.sohu.com/"
call ReportInformation("d:\test.xls")