How to read data from Excel sheets?

2 ビュー (過去 30 日間)
Leonardo Wayne
Leonardo Wayne 2016 年 3 月 31 日
コメント済み: Leonardo Wayne 2016 年 4 月 5 日
I have an Excel spreadsheet cell in location S2 that has the example data :
160225MD0004;#2;#13161504900013;#1
These items are followed by only by one or two symbols: for example ;#2 and ;# trailing the first item 160225MD0004. The first symbol will always follow the item to specify order(;#2) and the second symbol is an item separator-see 2nd items doesn't have one since it's the last item. There could be more than 2 items or even one item. I want to read using MATLAB functions the numbers: 160225MD0004 and 13161504900013 only. How can that be done?
  1 件のコメント
Jan
Jan 2016 年 3 月 31 日
The data format is not clear. "160225MD0004" is not a number.

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

採用された回答

Jan
Jan 2016 年 3 月 31 日
Perhaps strtok helps you to cut off the string part before the semicolon.
Instead of explaining the Excel-sheet, import the data by xlsread and post the code, which creates the resulting cell explicitly. Then the readersdo not have to guess, how the data looks like.
  1 件のコメント
Leonardo Wayne
Leonardo Wayne 2016 年 4 月 5 日
Thanks for your feedback. Apologies for the unclear question.

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

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by