Code covered by the BSD License  

Highlights from
Calculate Excel Range

5.0

5.0 | 1 rating Rate this file 14 Downloads (last 30 days) File Size: 5.02 KB File ID: #30180

Calculate Excel Range

by Richard de Garis

 

25 Jan 2011

Calculates full target range in Excel A1 notation.

| Watch this File

File Information
Description

XLCALCRANGE(REFCELL,R,C,M,N) returns the full target range XLRANGE in Excel A1 notation to cover an array of size M rows & N columns and starting from an offset of R rows & C columns from REFCELL.

Any workbook\worksheet prefix is removed from REFCELL, as are any absolute '$' markers prior to range calculation.
i.e.
REFCELL = 'C:\directorypath\[filename.xlsm]worksheet1'!$P$6:$AC$91

becomes:

REFCELL = P6:AC91

REFCELL can also be an Excel named range, but requires Matlab to already have the Excel workbook open in an actxserver process.

Note: this file makes use of 2 functions: dec2base27.m & base27dec.m that were sourced from inside of Mathwork's function, xlswrite.m

Please let me know of any bugs

MATLAB release MATLAB 7.11 (2010b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
12 Jun 2011 Qun HAN  
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
excel Richard de Garis 26 Jan 2011 09:14:06
range Richard de Garis 26 Jan 2011 09:14:06
excel Bryan White 03 Mar 2011 13:00:37
range Cedric 26 Oct 2011 07:19:02
excel Cedric 26 Oct 2011 07:19:06

Contact us at files@mathworks.com