This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

creating a DSN

 
Daniel Salzer
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I want to read data from a number of excel spreadsheets in a folder. However, I need to create the dsn dynamically through the Java code - anybody knows how to do that ? There should be a cmd line, right ?

Thanks

Daniel
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33696
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Daniel,
The DSN typically contains the driver and file name, right? The driver should be known in advance. And the file name, you can pass in at runtime. Concatenate these and you have the DSN. I may be missing the point here though.
 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

first, DSN u can get thru ...Control Panel>Administrative tools>Data Resources ...Here u can create a new DSN of type u want...(sometimes require user name and password)

secondly, using jdbc-odbc dsn for reading excel files mayt not be that much efficient...

so try to go for oracle thin driver...supports all that needed for reading excel
 
Andrew Eccleston
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I understand what you are looking for, I've been doing this with Access files. The URL is a bit different than normal:



I haven't tested this with Excel, but I think it would be:



Since it's just a string being passed in, you can build that programmatically before passing it in.

HTH,

andrew
[ February 14, 2005: Message edited by: Andrew Eccleston ]
 
Hareesh Ram Chanchali
Ranch Hand
Posts: 110
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

we do have problems in using such type of driver tosuch applications
you also verify..I do not think it can do all that you want

http://www.javaworld.com/javaworld/javaqa/2001-06/04-qa-0629-excel.html
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic