Reading data from Excel in Haskell

淺唱寂寞╮ 提交于 2020-01-13 07:56:09

问题


I would like to get data from .xls files without manually opening Excel. One possibility is to use COM automation.

There are the com-1.2.3 and hdirect packages, but I can't find any examples of how to use these packages with Excel.

Does anyone have a solution for this?


回答1:


With something like this, if your needs are relatively simple, I've found that it's more straightforward to find/write a command line executable that just pulls out a csv from the xls file. Then you invoke that executable from haskell, and proceed with its output from there.




回答2:


In Ruby, I use rjb (ruby java bridge) and use a library from Java for excel (e.g. JExcelAPI as explained in http://www.slideshare.net/weyus/rjb).

It seems that there are some Java bridges for Haskell? http://www.haskell.org/haskellwiki/Applications_and_libraries/Interfacing_other_languages#Java Though I have no experience with them...

I wonder whether that's the best solution...




回答3:


Now there is also xlsx on Hackage (for the Office Open XML xlsx format), although I haven't yet tried it myself.



来源:https://stackoverflow.com/questions/7998118/reading-data-from-excel-in-haskell

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!