How can I create a new table in a Microsoft Access database and import data to it using Matlab?
Mostrar comentarios más antiguos
Hello,
I am trying to export test data into an existing Access database, but I am having difficulty finding the correct commands to achieve this goal. I've been searching up and down the internet to try and find an example to go off of, but a lot of the info refers to a table already existing and simply inserting data into it.
The data I have for this instance is a 14x13 cell where the first column are names and the first row contains characteristics, everything else is the data. Another note, I expect different tests to very in their size so I'm trying to avoid anything hard coded where it can't pull NxM types of data, if that makes sense. I want to store everything in the database and I want it to look just as it does (format and what not) when I look at it in Matlab.
So far I know how to make the connection to the database, I just need someone to give me a hint or a tip to export this data. Let me know if you need more information. I'll also continue to work on it and if I figure anything out I'll keep this post updated.
Thank you in advance,
L
Respuesta aceptada
Más respuestas (1)
Sid Jhaveri
el 6 de Dic. de 2016
0 votos
1) You can refer to the following documentation link for general information on how Database Toolbox works: https://www.mathworks.com/help/database/getting-started-with-database-toolbox.html
2) As far as creating a new table goes, you will have go the SQL syntax for creating a table. Once you have the SQL statement ready, you can use it like " curs = exec(conn,sqlquery) " where "sqlquery" is the SQL statement for creating table.
Categorías
Más información sobre Database Toolbox en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!