jpsheader.jpg (29354 bytes)

AutoLisp Home

Home

 

 

G

E

T

C

E

L

L

S

 

 

GetCellsFunction - A function to get the value of a cell or cells from Excel.

Updated!  No longer needs the Excel Object Library


GetCellsFunction - This function has three parameters:

  FileName - The name and path of the Excel file.   Example "C:\Acad\TEST.xls"

  SheetName - The name of the Excel sheet.   Example "Sheet1"

  CellName - Examples "A3" "B1" "A1:A4" "B1:G4"


  Example of usage:

The download of GetCells is a program.  This program contains the function GetCellsFunction. Use this GetCells program as an example of how to use the GetCellsFunction function.  (I know, it looks funny)


  Returns:

(getCellsFunction "C:\\MYFILE.xls" "Sheet1" "A1:A4") would return:

("A1" "A2" "A3" "A4")

A list as shown above but the values would be listed instead of the cell names.

(getCellsFunction "C:\\MYFILE.xls" "Sheet1" "A1:B2") would return:

("A1" "A2" "B1" "B2")

A list as shown above except the values would be listed instead of the cell names.

(getCellsFunction "C:\\MYFILE.xls" "Sheet1" "A1") would return:

"A1"

An integer, string, or real as shown above but the value instead of the cell name


Simply add the GetCellsFunction to your program and call it. 


To Download the program click   <here>.

If you have any questions or problems about the program, click here.


AutoLisp Home

Home

All questions/complaints/suggestions should be sent to JefferyPSanders.com

Last Updated May 1st, 2013

Copyright 2002-2013 JefferyPSanders.com.  All rights reserved.