WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

OLE with Excel
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Simple Excel Read

Keywords: 	  simple excel read

cXls = "C:\Incoming\1 work\testnum.xls"

DB             = ObjectCreate("Excel.Application")
DB.Visible     = @FALSE
DB.UserControl = @FALSE
oAPP           = DB.Workbooks

oAPP.Open(cXls)

oWS    = DB.Worksheets(1)
oWS.Activate

For i=1 to 8
  oCell  = oWS.Cells(i,1)
  cType  = oCell.Value
  oCell  = oWS.Cells(i,2)
  cValue = oCell.Value
  message(cType,cValue)
Next

oWS = 0
oAPP.Close()
oAPP = 0
DB = 0

exit

Article ID:   W14933
File Created: 2009:04:03:11:09:40
Last Updated: 2009:04:03:11:09:40