Doug’s MATLAB Video Tutorials

June 5th, 2009

Building a GUI to read, modify and write an Excel file. 4/4

This is the fourth in a series of videos that will go through the process of planing and implementation of a simple GUI. Realistically, I would not plan out a GUI this simple, but the idea is to show what my planning process is on a simple example. The purpose of this GUI is to:
  1. Select an Excel file and read it into the MATLAB workspace
  2. Modify the data that came from the file. In this case by multiplying by a scalar
  3. Write the modified data into an Excel file with a name derived from the original filename
The first video is all about the planning of the GUI.

The second video creates the low-level functions needed to implement the functionality

The third video creates a single m-file that runs the low-level functions

The final video implements the simple GUI discussed here, calling the functions created above.

6 Responses to “Building a GUI to read, modify and write an Excel file. 4/4”

  1. MATLAB newbie replied on :

    Hi

    By using the xlsread function, MATLAB only reads from the first sheet in excel. The question I want to ask is how can I read from other sheets or even create one when exporting data into an excel spreadsheet?

    Thanks

  2. dhull replied on :

    @”MATLAB Newbie”

    http://www.mathworks.com/access/helpdesk/help/techdoc/ref/xlsread.html

    Look at the third syntax in the list. It shows how to specify the Excel sheet you want to read with MATLAB.

    Doug

  3. Don replied on :

    Hi Doug,
    thanks for the examples - could you post the source code?
    Thanks,
    Don

  4. dhull replied on :

    Don,

    I think is is long lost. Sorry!

    Doug

  5. Cliff replied on :

    I am working on a project where an avi video file is opened up inside a GUI made within MatLab (version 7.7.0). My problem is when I try to open avi video files from an external hardrive (also copying the file from the external hardrive to the computer), a pop-up error displays of “Video file wasn’t read!”

    Any ideas?

  6. dhull replied on :

    @Cliff,

    Can other programs open the same files?

    Doug

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


Doug Hull is a proud MathWorker who is on a mission to help you with MATLAB.

Doug's picture

These postings are the author's and don't necessarily represent the opinions of The MathWorks.