
|
G E T C E L L S
G E T C E L L S
|
|
GetCells - A function to get the value of a cell or cells from Excel into a list.
GetCells - This function has three parameters: ListOfCells - A list of cell addresses. Example (list "A3" "A4" "B1" "B2") FileName - The name and path of the Excel file. Example "C:\Acad\TEST.xls" SheetName - The name of the Excel sheet. Example "Sheet1" Example of usage: (setq cells(list "A1" "A2" "A3" "B1" "B2" "B3")) (setq fname "C://Acad//test.xls") or (setq fname "C:\Acad\test.xls") (setq sht "Sheet1") (setq myData(getcells cells fname sht)) Returns: A list containing list of cell addresses along with the cell values. Like this: ( ("A1" "123.6") ("A2" "345") ("A3" "Value of A3") ("B1" "Some Data") ("B2" "More Data") ("B3" "Data from B3") ) Notice all of the data will be returned as a string. Use distof, atof, or atoi to convert them back to numbers. Now even a novice programmer can access Excel's cell values without a learning curve. Simply add the function to your program and call it. To Download the program click <here>. If you have any questions or problems about the program, please check the help file for the XL program first. If this does not solve your problem, click here. All questions/complaints/suggestions should be sent to JefferyPSanders.com Last Updated April 19th, 2005 Copyright 2002-2005 JefferyPSanders.com. All rights reserved. |