'readtable' command creates 0-by-0 empty table or reports 'unable to open file' error. Bad installation of trial software? Japanese Excel problem?
13 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Daniel Bridges
am 22 Dez. 2015
Bearbeitet: Daniel Bridges
am 23 Dez. 2015
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.
2 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!