フィルターのクリア

Variable for range in xlswrite

1 回表示 (過去 30 日間)
Alexandros
Alexandros 2011 年 11 月 18 日
I have define a variable which is beeing calculated automaticaly.
This variable has been define
a = [starcell ':', endcell]
and it give me e.g.
a = g12: h12
Now when i write
xlswrite('1.xls', Y, 3, a) it doesn't want to understand the range. The variable a is a character string . Does anybody have any idea?

採用された回答

Sven
Sven 2011 年 11 月 18 日
Providing a variable as a string should be exactly the same as providing that string directly. Here are 3 possibilities that I can think of:
1. Did you intend to have the space " " character in the string "g12: h12". Try it without the space.
2. Make sure that the variable Y matches exactly the size you defined with g12:h12 (ie, it's 1-by-2)
3. Try uppercase 'G12:H12'
  1 件のコメント
Alexandros
Alexandros 2011 年 11 月 18 日
Yes I fixed it. It was the space between the g12: h12.
My function i made to find the cells i need to put them was automatically putting a space between them. I took it out and work fine

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by