I got the database toolbox for R2012b, but I can't seem to connect to any database. I don't get any errors. I want to start off simple with an excel connection using database toolbox. Does anyone know how to establish a connection using database toolbox to a excel spreadsheet?
I can't find it anywhere in the documents.

댓글 수: 3

Geoff Hayes
Geoff Hayes 2015년 2월 4일
Viral - please post the code that you are using to connect to a database so that someone can provide some guidance on what to do next.
Hello Geoff,
That's the issue. I have no idea on how to start the code to establish a connection to excel via database toolbox.
This is the code I use to connect to Access, but even that doesn't seem to work. When I use the following code for access and use the function isconnection, it returns false.
Access Database code:
dbpath = ['Z:\NBush Files\Holdings Files.mdb'];
url = [['jdbc:odbc:Driver={Microsoft Access Driver (*.mdb, *.accdb)};DSN='';DBQ='] dbpath];
cone = database('','','','sun.jdbc.odbc.JdbcOdbcDriver', url);
Geoff Hayes
Geoff Hayes 2015년 2월 5일
편집: Geoff Hayes 2015년 2월 5일
Viral - have you gone through the tutorial of http://www.mathworks.com/help/database/ug/microsoft-access-odbc-windows.html? It may provide some useful tips on how to set up your connection.
(Though I'm not sure why you are trying to connect to Excel which is a spreadsheet and not a database like MS Access.)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Data Import from MATLAB에 대해 자세히 알아보기

질문:

2015년 2월 4일

편집:

2015년 2월 5일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by