You can make an ODBC connection to excel, but you would have to change the
DSN for every file and you would have to have some idea what thefile
looked like (columns) before hand.
If I were you I would write another excel document and use some VBA to
open up a requested Excel and save it as HTML then parse the HTML
to convert it to your XML.
"Wang, Jianming" wrote:
>
> Do you think I can odbc connection to Excel file? I am not using MS Access
> but using MS Excel.
>
> My project is to automatically convert all downloaded Excel files into XML
> using Java. I can not find any tool for this.
>
> -----Original Message-----
> From: Michael Wentzel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 16, 2001 12:05 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Excel to XML
>
> >
> > Jianming Wang
> >
>
> If you're talking strictly data you could make an odbc
> connection and suck out the data that way. If you're
> talking about the whole ball of wax(formatting, precision,
> data, etc.) you are probably going to need to right some
> native(c++) code and use the M$ components to interact
> with excel files. M$ has a knack of slipping little
> things in here and there so that it makes it difficult for
> others to do anything with their stuff(i.e. remember that
> whole M$ jvm/J++ fiasco). Alternately, I'm sure someone
> has written a commercial API to interact directly with
> excel files and get more information than just the data,
> but of course this costs money.
>
> HTH
>
> ---
> Michael Wentzel
> Software Developer
> Software As We Think - http://www.aswethink.com
> mailto:[EMAIL PROTECTED]
>
> - Punisher of those who cannot spell dumb!