excel file with .mat extension, convert to .cvs
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi,
I have an old address book file that was made using excel on an (unknown) old version windows.
The file extension is .mat instead of cvs and won't load in Open Office, how would I go about converting it a readable .cvs for Open Office/Excel.
I am new to Matlab (2 hours) but I can follow basic instructions.
I have got as far as:
Warning: File contains uninterpretable data.
> In importdata (line 146)
In uiimport/runImportdata (line 496)
In uiimport/gatherFilePreviewData (line 438)
In uiimport (line 262)
Warning: File contains uninterpretable data.
> In importdata (line 146)
In uiimport/runImportdata (line 496)
In uiimport/gatherFilePreviewData (line 438)
In uiimport (line 262)
>> load('Address book.MAT')
I tried load '-ascii' and got this:
>> load ('Address_book.mat', '-ascii')
Error using load
Unable to read file 'Address_book.mat'. No such file or directory.
and this:
Not a binary MAT-file. Try load -ASCII to
read as text.
Tried xlsread:
>> xlsread ('Address_book.mat')
Error using xlsread (line 136)
Unable to open file 'Address_book.mat'.
File not found
At this point I thought I should ask the community here, sorry for the long post just trying to give you an idea of where I at with this.
I followed this video to start with:
Any tips would be great and very welcome
Thanks
3 commentaires
dpb
le 3 Mai 2020
Well, the "File not Found" messages are telling you that you didn't pass a qualified file name to the file including the path and that it isn't in the MATLABPATH without.
You didn't show us the dir command in comparison, but the comment "to check the folder" implies you told it where to look. Why not give the other routines the same courtesy: :)
If the file was created in Excel, then unles it was made by using "SaveAs" and some other file type besides just the extension, it likely is still a .xls file inside. Just for grins, I'd try making a copy as a .xls extension and try Excel to open it.
I don't use Excel enough to know whether it will read a file with the wrong extension if try to open it explicitly -- the Windoes file links won't work, of course.
Just try opening it in the text editor to see whether it is actually a text file or not -- I'd say probably unlikely, but can't hurt anything to look.
Réponses (1)
Walter Roberson
le 4 Mai 2020
#D#a#t#a#b#a#s#e#N#a#m#e#=#A#d#d#r#e#s#s# #b#o#o#k#.#m#d#b#
The .mdb is a clue that you are dealing with a Microsoft database.
And indeed, .mat can be a Microsoft Access Table file. You need Microsoft Access to read the file. (You might also need a file named "Address book.mdb")
5 commentaires
Stephen23
le 6 Mai 2020
"It loads in Microsoft Access but not Excel"
Microsoft Access uses databases, which in general don't directly convert to Excel spreadsheets (although they may be linked in various ways).
Apart from the coincidence that the file extension is the same as one commonly used by MATLAB files, your question now has nothing to do with any TMW product, and is beyond the scope of this forum. You would be more likely to useful advice from people who actually know about MS Access, i.e. by asking on a forum related to MS products.
Voir également
Catégories
En savoir plus sur Data Import from MATLAB dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!