- .txt, .dat, or .csv for delimited text files
- .xls, .xlsb, .xlsm, .xlsx, .xltm, .xltx, or .ods for spreadsheet files
readtable successful on .xlsx file but fails on .xlsb file
조회 수: 7 (최근 30일)
이전 댓글 표시
readtable works fine reading an .xlsx file, but hangs when reading an .xlsb file.
The following works perfectly:
dat = "C:\DataDirectory\DataFile.xlsx";
T = readtable(dat);
I read in the documentation for readtable that for large Excle files reading the .xlsb format is recommended, so I saved the Excel file in .xlsb format and I tried:
dat = "C:\DataDirectory\DataFile.xlsb";
T = readtable(dat);
but this opens the Excel file and then freezes both Excel and Matlab. The only way to recover was to end the Excel process via TaskManager.
Matlab version is 2019b.
Excel version: Microsoft® Excel® for Microsoft 365 MSO (Version 2302 Build 16.0.16130.20374) 32-bit
I can continue to work with the .xlsx format, but I'm still curious if I'm doing something wrong, or if there is a known issue. It would be nice to use the .xlsb format if it in fact loads faster.
댓글 수: 0
답변 (1개)
Cris LaPierre
2023년 5월 4일
편집: Cris LaPierre
2023년 5월 4일
readtable determines the file format from the file extension:
How were your xlsb files created? Can you attach one to your post for others to test?
You might consider adding the 'UseExcel' flag.
dat = "C:\DataDirectory\DataFile.xlsb";
T = readtable(dat,'UseExcel',true);
댓글 수: 3
Cris LaPierre
2023년 5월 4일
If your information is confidential, then I suggest working directly with support. You can reach out to them here: https://www.mathworks.com/support/contact_us.html
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!