Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention. Check out this how-to article for more information.
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.