get(Excel.​Activeshee​t,'Range',​x) => error code: 0x800A03EC

3 views (last 30 days)
I am having problems when using get(Excel.Activesheet,'Range',x) in Matlab.
If I do like that:
-----------------------------------------------------------------------------
x = 'D4,D16,D28,D40,D52,D64,D76,D88,D100,D112,D124,D136,D148,D160,D172,D184,D196,D208,D220,D232,D244,D256,D268,D280,D292,D304,D316,D328,D340,D352,D364,D376,D388,D400,D412,D424,D436,D448,D460,D472,D484,D496,D508,D520,D532,D544,D556,D568,D580,D592,D604,D616,D628'
Range = get(Excel.Activesheet,'Range',x);
---------------------------------------------------------------------------
I have no problem.
But if I add one more value to X :
-----------------------------------------------------------------------------
x = 'D4,D16,D28,D40,D52,D64,D76,D88,D100,D112,D124,D136,D148,D160,D172,D184,D196,D208,D220,D232,D244,D256,D268,D280,D292,D304,D316,D328,D340,D352,D364,D376,D388,D400,D412,D424,D436,D448,D460,D472,D484,D496,D508,D520,D532,D544,D556,D568,D580,D592,D604,D616,D628,D640'
Range = get(Excel.Activesheet,'Range',x);
---------------------------------------------------------------------------
Then I have this error in Matlab:
??? Error: Object returned error code: 0x800A03EC
The reason is that on the second example X is a string of more than 255 letters, which is not the case in the first example.
If it can helps, my goal is to draw an excel chart with the previous values using something like that:
NewSeries = invoke(Excel.ActiveChart.SeriesCollection,'NewSeries');
NewSeries.XValues = X_Range;
NewSeries.Values = Y_Range;
By the way, I am using the new Excel version (.xlsx) and I don't now if it is useful but I use Matlab 7.9.0 R2009b
Do you have any idea how to solve this problem? Thank you in advance!

Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!