'readtable' command creates 0-by-0 empty table or reports 'unable to open file' error. Bad installation of trial software? Japanese Excel problem?
13 次查看(过去 30 天)
显示 更早的评论
I used the R2015b Windows (64-bit) Installer Download to install a trial version of MATLAB with I think all available toolboxes (all checkboxes selected). I registered for an account providing my Japanese university student credentials.
The first thing I tried to do was
T = readtable('[filename].xlsx')
in a script, running it and changing to the folder it and the file were saved in. It succeeded in creating a 0-by-0 table stored in T. After various additional attempts I moved the files into the default Documents\MATLAB folder and restarted MATLAB, thinking perhaps the trial version was limited to it.
I then opened Excel and converted the spreadsheet from xlsx to csv, of course updating the command to match. This successfully worked once, and then upon repetition -- after adding 'clear' and 'clc' to my script -- resulted in the 'unable to open file' error.
I opened the csv in Excel to discover the Japanese kanji had been replaced with question marks, even the very first character of the file; the first cell heading its row had started with kanji. I replaced the question marks with the kanji's English translation and restarted MATLAB, but I'm still getting this error:
Trial>> [scriptname]
Error using readtable (line 135)
Unable to open file '[filename].csv'.
Error in [scriptname] (line 7)
T = readtable('[filename].csv')
Did I break MATLAB by using readtable on a file with kanji immediately after a trial installation?
I installed the trial software via Remote Desktop onto the 64-bit Windows 10 Pro desktop that is using it. The data was put into an XLSX spreadsheet file by Dr. View RTiS software at a Japanese hospital and initially contained a macro, which I deleted together with four blank rows, so that the data file started on its first row (column headings). I used Excel 2013 on the computer with the MATLAB trial to create the csv file. I could provide a few more details, but I suppose that's all that's relevant.
I'm trying the command exactly like it's presented in its documentation , and the files were not open in any other software apart from being listed in a Windows Explorer window.
How do I resolve this problem? Thank you for your time.
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Introduction to Installation and Licensing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!