Readtable extremely slow when excel file has formatting

조회 수: 32 (최근 30일)
JW
JW 2017년 8월 15일
댓글: Marguerite Kennish 2020년 7월 16일
I'm having an issue with using readtable to read in an excel file. When I read in my excel file (which has formatting), the readtable command can take 30 minutes to read a single sheet. However, when I copied and pasted the values into a new excel sheet (no formatting), the command only took 10 s.
I've tried removing styles from the original workbook / sheet and clearing formatting, but oddly, the sheet still takes forever to process. Was wondering if anyone could explain to me why the original excel takes so long to process, but copying and pasting the values into a new sheet makes it so much faster to process.
FYI, I'm using Matlab2017a, although I had this problem with Matlab2016 as well.
  댓글 수: 1
ds
ds 2019년 5월 17일
Had exactly the same issue recently with Matlab2019a.

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

답변 (1개)

Jiro Doke
Jiro Doke 2017년 8월 15일
편집: Jiro Doke 2017년 8월 15일
Have you tried setting the "basic" property to false?
t = readtable('file.xlsx','basic',false)
  댓글 수: 5
Bruce MacWilliams
Bruce MacWilliams 2019년 6월 17일
I had the same problem (2019a), taking 3 minutes to read a relatively small data set. Setting 'basic' to true fixed it, same file takes about 0.5 seconds. Thanks.
Marguerite Kennish
Marguerite Kennish 2020년 7월 16일
The basic true method cut my time from 67 seconds to 22 seconds.

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

카테고리

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