Hi,
I am new to this forum and scripting. I am tring to add a row to an excel file. The file contains 6 colums and the rows are populated with peoples First Name, Mid Init, Last name, birthdate, job type and date.
I am trying to add a row with Description of the colums (header)at the begining of the spreadsheet. I am not sure how to go about doing this?
Const xlShiftDown = -4121
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("c:\tele.csv")
Set objWorksheet = objWorkbook.Worksheets(tele)
int i = 1
int j = 1
Do Until objWorkSheet.Cells (i, 1) = ""
for j = 1 to 6
Set objRange = objWorksheet.Cells(i,1).EntireRow
objRange.Insert(xlShiftDown)
objWorkSheet.Cells(i, 1).Value = "First name"
Loop
objExcel.Quit
I am new to this forum and scripting. I am tring to add a row to an excel file. The file contains 6 colums and the rows are populated with peoples First Name, Mid Init, Last name, birthdate, job type and date.
I am trying to add a row with Description of the colums (header)at the begining of the spreadsheet. I am not sure how to go about doing this?
Const xlShiftDown = -4121
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("c:\tele.csv")
Set objWorksheet = objWorkbook.Worksheets(tele)
int i = 1
int j = 1
Do Until objWorkSheet.Cells (i, 1) = ""
for j = 1 to 6
Set objRange = objWorksheet.Cells(i,1).EntireRow
objRange.Insert(xlShiftDown)
objWorkSheet.Cells(i, 1).Value = "First name"
Loop
objExcel.Quit