Read all Excel cells between two strings

1 回表示 (過去 30 日間)
mark
mark 2022 年 7 月 10 日
コメント済み: dpb 2022 年 7 月 10 日
Hi,
I have an Excel sheet which contains 4 sheets and in each of these sheets, there are 3 occasions where the words 'Interval 1' and 'Interval 2' appear (each of them is in it's own cell). I would like to write a code that finds these two words/strings and reads in all of the cells inbetween these two strings (the two strings and the data inbetween them are all on the same row in the excel sheet) and store the end result in a 4x3 cell array, where each cell in this array contains all of the data inbetween these two strings. I'm very puzzled on how to approach this (maybe use strcmp?). Any help would be very appreciated!
Thank you
  1 件のコメント
dpb
dpb 2022 年 7 月 10 日
Read the full sheets as string arrays and use the fancy new extractBetween function sounds like the meal ticket.
But, you'll have a lot more success in somebody writing some directly applicable code if you attach one of the files...

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by