Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Push Code into Excel using OLE
; ******************************************************************************** ; * ; * Excel OLE Sample ; * ; ******************************************************************************** objXL = ObjectOpen("Excel.Application") objXL.Visible = @TRUE Workbooks=objXL.WorkBooks Workbooks.Add Numbers="One Two Three Four Five Six Seven Eight Nine Ten" offset=1 row=0 :ROWLOOP col=0 row=row+1 if row > 10 then goto byebye strValue=ItemExtract(row,Numbers," ") colIndex=row+offset ;Column Heading Cells1=objXL.Cells(1, colIndex) Cells1.Value=strValue ;Add special properties myfont = Cells1.Font myfont.FontStyle = "BOLD" myfont.size = 12 myfont.ColorIndex = 3 ; RED ;Row Heading Cells1=objXL.Cells(row+1, 1) Cells1.Value=strValue ;Add special properties myfont = Cells1.Font myfont.FontStyle = "BOLD" myfont.size = 12 myfont.ColorIndex = 3 ; RED :COLLOOP col=col+1 if col > 10 then goto ROWLOOP ;Sets values of cells strValue=row*col Cells1=objXL.Cells(row+offset, col+offset) Cells1.Value=strValue ;Add special properties myfont = Cells1.Font myfont.FontStyle = "BOLD" myfont.size = 10 goto COLLOOP :byebye ObjectClose(objXL) Message("WinBatch OLE Sample","Complete")
Article ID: W15256
File Created: 2002:09:05:13:50:52
Last Updated: 2002:09:05:13:50:52