No BSD License  

Highlights from
FASTGETGRID

5.0

5.0 | 1 rating Rate this file 10 Downloads (last 30 days) File Size: 6.21 KB File ID: #9765
image thumbnail

FASTGETGRID

by

 

26 Jan 2006 (Updated )

Extracts values and formuals form all worksheets in a Microsoft Office Spreadsheet Object (OWC).

| Watch this File

File Information
Description

FASTGETGRID extracts values and formuals form all worksheets in a Microsoft Office Spreadsheet Object (OWC). It also provides the numerical and the string variables seperately

USAGE:

>> h = actxcontrol('OWC11.Spreadsheet.11',[0 0 550 420]);
>> FastFillGrid(h, ...
{'Maturity' ,'4/15/09','' ; ...
'coupon' ,8.63 ,'ANN' ; ...
'redemption' ,100 ,'' ; ...
'Yield' ,10.1660 ,'' ; ...
'' ,'' ,'' ; ...
'dirty price' ,97.2088 ,'' ; ...
'accrued interest',6.2088 ,'' ; ...
'clean price' ,91.0000 ,'' });
>> A = FastGetGrid(h)
A =
Sheet1: [1x1 struct]
Sheet2: [1x1 struct]
Sheet3: [1x1 struct]

>> % LOOK AT SHEET 1
>> A.Sheet1
ans =
Formula: {8x3 cell}
Value: {8x3 cell}
String: {8x3 cell}
Number: {8x3 cell}

>> % LOOK AT THE FORMULAS IN SHEET 1
>> A.Sheet1.Formula
ans =
'Maturity' '39918' [NaN]
'coupon' '8.63' 'ANN'
'redemption' '100' [NaN]
'Yield' '10.166' [NaN]
[ NaN] [ NaN] [NaN]
'dirty price' '97.2088' [NaN]
'accrued interest' '6.2088' [NaN]
'clean price' '91' [NaN]

>> % LOOK AT ALL OF THE VALUES IN SHEET 1
>> A.Sheet1.Value
ans =
'Maturity' '4/15/2009' [NaN]
'coupon' [ 8.6300] 'ANN'
'redemption' [ 100] [NaN]
'Yield' [ 10.1660] [NaN]
[ NaN] [ NaN] [NaN]
'dirty price' [ 97.2088] [NaN]
'accrued interest' [ 6.2088] [NaN]
'clean price' [ 91] [NaN]

>> % LOOK AT ONLY THE STRINGS IN SHEET 1
>> A.Sheet1.String
ans =
'Maturity' '4/15/2009' []
'coupon' [] 'ANN'
'redemption' [] []
'Yield' [] []
[] [] []
'dirty price' [] []
'accrued interest' [] []
'clean price' [] []

>> % LOOK AT ONLY THE NUMBERS IN SHEET 1
>> A.Sheet1.Number
ans =
[] [] [NaN]
[] [ 8.6300] []
[] [ 100] [NaN]
[] [10.1660] [NaN]
[NaN] [ NaN] [NaN]
[] [97.2088] [NaN]
[] [ 6.2088] [NaN]
[] [ 91] [NaN]

KEY WORDS: Excel spreadsheet workbook sheet formula extract i/o input file grid

SEE ALSO:

http://www.mathworks.com/matlabcentral/fileexchange/loadAuthor.do?objectId=828141&objectType=author

Good MATLAB Programming Practices, graph_and_table, TechAnalTool,
MagnetGInput, Spreadsheet, df, fts, dlmreadall, robustreadcsv,
plottt, txt, db, mode, matlab, BreakAxis, Tick, Bar, plot, axisatorigin,
RegExTools, pcode_helper, SplitTxtFile, PlotDataDays, graph_and_table_,
ShadePlotForEmphasis, perl_regex_rep, DatabaseCell, Mat, SelectBox,
evaldialog, fixfilename, ExpandRegexSet, FillGrid, load, var,
SearchReplaceManyGUI, ToSavedWorkspace, AnonymousCompile,
SearchAndReplaceMany, StringIsNumber, DepSubFun, CheapHLOCPlot,
AUTOHELP, FastFillGrid, OKDLGWITHLISTBOX, QUESTDLGWITHGRID,
Spreadsheet, Structure, BullInAChinaShop, repfloat, GetSubFunNames,
REORDERPDF, SelectDatesAndSecs, WideOKDlgWithListBox,
StrrepLikeRegexprep, AddRecursivePath, SelectDateParameters,
ParseVarArgIn, AssignVarargin, CatOrSplitFile, SplitFunctions,
FixFileName, BuildKeyWhereClause, CellOrNoCellRef, AnalyseExcelFormulas

MATLAB release MATLAB 7.1.0 (R14SP3)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (1)
24 Jan 2007 dave holden

Just what I needed. Together with his earlier submissions with more low level functions this is very nice.

Contact us