Guest ronald Posted March 22, 2005 Posted March 22, 2005 HELLO To ALL WHAT I MUST DO IT IS TO READ The INFORMATION OF A EXCEL BOOK THAT I HAVE And THIS SAME INFORMATION IS WRITTEN IN A PAGUINA OF Internet, (The INFORMATION CAN BE SEPARATED BY COMMAS IN EXCEL)
automagician Posted March 22, 2005 Posted March 22, 2005 I am assuming that this:(The INFORMATION CAN BE SEPARATED BY COMMAS IN EXCEL)means it can be in a .csv file, if that is the case, i wrote a function awhile ago that pulls data from the .csv file here it is:expandcollapse popup;------------------------------------------------------- ;Function Name: table_cell_val() ;Purpose: This function goes into the table and retrieves ; the data from the cell. Which cell it looks in ; is determined by the parameters passed. ;Parameters: $table - The data table to use ; $colName - The name of the column that the ; cell is located in. ; $row - Which row to use. *NOTE = row 1 is ; the column name row. ;------------------------------------------------------- Func table_cell_val($table, $colName, $row) $colNum = 1 $handle_a = FileOpen($table, 0) ; Check if file opened for reading OK If $handle_a = -1 Then MsgBox(0, "Error", "Unable to open table.") Exit EndIf $string = FileReadLine($table, 1) $array = StringSplit($string, ","); Splits up the location string $totCol = $array[0] While $colNum <= $totCol If ($colName == $array[$colNum]) Then ExitLoop Else $colNum = $colNum + 1 EndIf Wend $totRow = _FileCountLines($table) $string = FileReadLine($table, $row) $array = StringSplit($string, ","); Splits up the location string $ret = $array[$colNum] FileClose($handle_a) Return $ret EndFuncHope that helps...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now