Calculate Excel Range

버전 1.3.0.0 (6.89 KB) 작성자: Richard de Garis
Calculates full target range in Excel A1 notation.
다운로드 수: 1.3K
업데이트 날짜: 2013/9/17

라이선스 보기

xlrange = xlcalcrange(h,refCell,r,c,m,n)returns the full target range, xlrange in Excel A1 notation to cover an m-by-n array, starting from an offset of r rows & c columns from the starting cell, 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 the Excel workbook to be open via an actxserver COM object, and a handle to the object, h, passed as a function argument. h is ignored if refcell is not a named range.

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

인용 양식

Richard de Garis (2024). Calculate Excel Range (https://www.mathworks.com/matlabcentral/fileexchange/30180-calculate-excel-range), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2012b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.3.0.0

Added Excel COM workbook handle to argument list, to enable use of named ranges when multiple workbooks are open. This is ignored if not using a named range

1.0.0.0