[erlang-questions] reading excel files in Erlang
Kevin A. Smith
kevin@REDACTED
Fri Apr 17 02:48:28 CEST 2009
Another possibility would be to use Apache POI (http://
poi.apache.org/) and JInterface.
--Kevin
On Apr 16, 2009, at 2:27 PM, Jan Jacobs wrote:
> Hi Michael,
>
> Use ODBC, it is the easiest way of getting data from excel files.
> See example below:
>
> ConnStr =
> "Driver={Microsoft Excel Driver
> (*.xls)};DriverId=790;Dbq=c:\\projects\\DeepBlue\\lib\\prototype\
> \ebin\\data\\Saco.xls;DefaultDir=c:\\projects\\DeepBlue\\lib\
> \prototype\\ebin\\data;",
>
> {ok,Ref} = odbc:connect( ConnStr, [{timeout, 45000}] ),
> {selected, _ColData, DataList} = odbc:sql_query( Ref, "SELECT * FROM
> [Query$];" ),
> process_cards( Tab, DataList ),
> odbc:disconnect( Ref )
>
> Important info from http://www.connectionstrings.com/
> Driver={Microsoft Excel Driver
> (*.xls)};DriverId=790;Dbq=C:\MyExcel.xls;DefaultDir=c:\mypath;
> SQL syntax "SELECT * FROM [sheet1$]". I.e. excel worksheet name
> followed by a "$" and wrapped in "[" "]" brackets.
>
> Cheers
> Jan
>
> Michael Connors wrote:
>> Hi,
>> Does anyone know if there is an Erlang module for extracting data
>> from
>> data from excel files?
>> I didn't find one on CEAN, but I am new to Erlang so could be looking
>> in the wrong place.
>>
>> Regards
>> --
>> Michael
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://www.erlang.org/mailman/listinfo/erlang-questions
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - www.avg.com
>> Version: 8.0.238 / Virus Database: 270.11.57/2060 - Release Date:
>> 04/15/09 06:34:00
>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list