필터 지우기
필터 지우기

How to read .txt and convert to .xlsx?

조회 수: 1 (최근 30일)
Shoumy
Shoumy 2018년 8월 20일
댓글: Walter Roberson 2018년 8월 20일
I have a .txt file with 135 columns and around 1000 rows. I want to convert it into an excel file. However when I use importdata, some of the rows are read as string and stuffed into one cell. I have also tried textscan but I get the error 'Index exceeds matrix dimensions.'. How do I write a code where each row in .txt will be written in its separate cell in .xlsx for all 1000 rows?
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 8월 20일
readtable() and then writetable() .
Depending how the .txt file is divided internally, it might be easier to use detectImportOptions() before the readtable() .

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by