#171226 - 2006-12-08 11:10 AM
Re: read cell from excel then validate data
[Re: Witto]
|
Witto
MM club member
   
Registered: 2004-09-29
Posts: 1828
Loc: Belgium
|
Here are more comments
;Script Options If NOT @LOGONMODE Break On Else Break Off EndIf Dim $RC $RC = SetOption("Explicit","On") $RC = SetOption("NoVarsInStrings","On") $RC = SetOption("NoMacrosInStrings","On") $RC = SetOption("WrapAtEOL","On")
;Declare variables Dim $objExcel, $File, $Value ;Path to Excel sheet $File = "\\Server\Share\Folder\WorkBook.xls" ;Create Excel object $objExcel = CreateObject("Excel.Application") ;Check if the object was created If @error = 0 ;If it was created, open file $RC = $objExcel.Workbooks.Open($File) ;Catch the value in cell C6 $Value = $objExcel.Range("C6").Value ;Screen output of variable $Value ? $Value Else ;If Excel object was not created, show error message ? "Error creating Excel object" ? "Error " + @ERROR + ": " + @SERROR EndIf
|
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 697 anonymous users online.
|
|
|