Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT
strExcelPath = "C:\myfiles\header.xls" Const ForReading = 1 Const ForWriting = 2 'Added to save changes without being prompted by Excel Const xlSaveChanges = 1 Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("C:\myfiles\test.txt", ForReading) strContents = objFile.ReadAll objFile.Close strContents = Replace(strContents, "|", vbTab) Set objFile = objFSO.OpenTextFile("C:\myfiles\test.txt", ForWriting) objFile.Write strContents objFile.Close Set objExcel = CreateObject("Excel.Application") 'Add row here??? 'Shift all other values down Set objWorkbook = objExcel.Workbooks.Open("C:\myfiles\test.txt") objExcel.ActiveWorkbook.cells.addrow("1,1") objExcel.ActiveWorkbook.SaveAs strExcelPath objExcel.ActiveWorkbook.Close xlSaveChanges objExcel.Application.Quit WScript.Echo "The Upload is Complete"
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.