开发者

Working with Excel files in web app frameworks like Seaside

Ive been reading about seaside and like the sound of it but i cant see an easy way for handling data files, primarily importing Excel. Of course csv files would be 开发者_开发问答more straight forward, but are there any ways to import the various Excel formats (xls,xlsx) without writing your own file parsing routines?

I've heard that the need to open Excel files would be a good reason to choose a windows based system like .NET, what do you guys think?


There are various Smalltalk implementation that support Seaside and that have an excellent integration into the Windows platform: Dolphin Smalltalk, VA Smalltalk, and Cincom Smalltalk. I assume that it is possible to call Excel with any of these.

There are various command line tools available that you could call to convert an XLS file to something you can easily parse (like CSV).

However, I think the most elegant solution (also from an end-user perspective) is the one of Magic/Replace.


Just an answer on the second part of your question: no that is not a good reason. You definitely do not want to run Office as a server proces (I never tried with OpenOffice, but that should work somewhat better). It is not stable and there are license issues you have to be aware of.


I've worked on a Seaside app that read and wrote excel sheets on Linux. Here's what I did …

  • First, I had OpenOffice run in the background and converted all office files to OpenDocument format,
  • and then I imported that into Squeak using some code by Takashi Yamamiya. A word of warning: by the time when I used it, excel import and export didn't work at all, it took me an afternoon and a bit of hacking to get that running, but then it went fine (Niko, why didn't you push the changes back online? Well, you see … ehh, I forgot. And now they're somewhere well hidden on my disk and I don't feel like searching.)

And that's it. It wasn't even slow, just make sure that OOo is running constantly in the background.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜