SPREADSHEET is an example of how to use the Microsoft Office Spreadsheet Object.
This example, in response to the CSSM thread "ActiveX (Microsoft Office Spreadsheet)," demonstrates how to use the MS Office Spreadsheet object to display cell, character, logical and numeric matricies. It also demonstrates how to use an enumerated class workaround and how to
get the active cell, sheet, row and column from the spreadsheet. Various other methods and properties are explored and demonstrated. Much has been lifted from ML examples.
The Microsoft Office Spreadsheet object allows inputs and calcuations.
NOTE: TO SEE AN EXAMPLE OF HOW TO USE GRID OBJECTS WHICH HAVE SOME ADVANTAGES OVER THE MICROSOFT SPREADSHEET OBJECT,SEE MY EXAMPLE CALLED "GRAPH_AND_TABLE" WHICH IS AVAILABLE ON THE MATHWORKS FILE EXCHANGE:
NOTE: If you cannot instantiate the control, try changing 'OWC11.Spreadsheet.11' to 'OWC10.Spreadsheet.10' or even 'OWC9.Spreadsheet.9'
See Also: Grid_and_Table at the MATLAB File Exchange
Keywords: grid spreadsheet ActiveX Active-X Active X GUI Table graph_and_table plot graph table grid object flexgrid msflexgrid ocx tabular
Thanks: TMW, Max Chtangeev, useActiveXControl, Brett Shoelson
IT'S NOT FANCY, BUT IT WORKS
I tried to run the program shared above. However, at the following command "Spreadsheet1 = actxcontrol('OWC11.Spreadsheet.11',[0 0 psn(3:4)]);",
the following message displays:
"Error using feval
Input PROGID does not represent an Activex
If this PROGID used to work before, please
check vendor's documentation for
equivalent activex control progid.
Error in actxcontrol/createControl (line
Error in actxcontrol (line 180)
Error in Spreadsheet (line 107)
I think the 'OWC11.Spreadsheet.11' activex control is not installed on my computer. Does anyone know how to solve this problem?
Thanks for your help
How can I make another sheet tab active ('Sheet 2' instead of 'Sheet 1' for example)?
extremely useful... keep posting stuffs like this so tht novice like me will find it really useful.
how to access the datas inputed by the user in the spread sheet in my mfile. is there direct methods to access by giving the corresponding cell name??
Yes, use FastFillGrid to fill it without loops:
Good demonstration of properties. However, is there a way to fill the table without a nested loop? I.e. can I assign a Matlab vector to a column without looping through it?
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.