Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Matlab excel interface
Replies: 5   Last Post: Mar 8, 2013 11:08 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 146
Registered: 2/11/08
Re: Matlab excel interface
Posted: Mar 8, 2013 3:39 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

What the heck??? I find it hard to believe that you' can't write 100 rows of data to Excel from Matlab. Excel can handle a little over a million rows; Matlab can handle much more. You must be doing it wrong. Check out the samples here:

More samples here:

Finally, see these two examples:

"james bejon" wrote in message <kgvs28$osu$1@newscl01ah.mathworks.com>...
> Ah, you may have to do it the slow way then, i.e. opening an instance of Excel and writing to it one cell at a time. I don't have Excel (or Matlab) to hand, but something like this perhaps:
> % Data
> dat = repmat({char(64+ceil(rand(1,2000)*26))}, 10, 10);
> % Excel handles
> xlsApp = actxserver('Excel.Application');
> xlsWbk = invoke(xls.Workbooks, 'Add');
> xlsSht = invoke(xlsWbk.Worksheets, 'Item', 1);
> xlsRng = invoke(xlsSht, 'Range', 'A1');
> % Action
> for i = 1:size(dat, 1)
> for j = 1:size(dat, 2)
> set( get(xlsRng, 'Offset', i-1, j-1), 'Value', dat{i, j} )
> end
> end

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.