作为服务器进程读取 Excel 文件 [英] Reading Excel Files as a Server Process

查看:25
本文介绍了作为服务器进程读取 Excel 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试寻找一种合适的方法来读取 NT 服务器操作系统上 Excel 文件的内容.我在使用 Excel API 时遇到了很多问题,然后遇到了官方 Microsoft on Office Automation 指出 Excel API 不适合 Excel 自动化.我看到的各种问题与文章中描述的类似.

是否有另一种方法可以让我在服务器(无 UI)上读取 Excel 文件(xls、xlsx、xlsm),而不会遇到相同类型的线程/安全/许可问题Excel API?

解决方案

有许多库被不同的用户突出显示,它们允许实现所需的功能.我在这里列出了它们,其中一些已经过评估,因此在适当的情况下我尝试写下有趣的评论来比较它们.我所包含的细节完全基于意见,但是这些库中的任何一个都可能实现所需的目标.

SpreadsheetGear.Net
(因采购成本高未评价)

Aspose.细胞
(由同事评估.似乎实现起来相当简单,性能可与 Excel Interop 相媲美).

GemBox
(未评价)

Excel 服务
(似乎只包含在 SharePoint 2007 中)

Excel 映射器(未评估,因为它需要导入不符合我要求的强类型对象).

SmartXls
(未评估,因为它需要导入不符合我要求的强类型对象).

ActiveXls
(相当容易使用,缺乏属性会引发问题,他们更喜欢用方法来处理琐碎的动作.尽管声称便宜的 FlexCel 每秒执行 100 万条记录.已经决定帮助/API 手册几乎没用.)

Koogra
(由于找不到文档/信息而未进行评估)

文件助手
(未评价)

Flexcel
(找到了成本最低的解决方案,性能良好且易于实施,与 Excel 互操作结构非常接近.还从支持人员那里得到了对技术问题的快速响应.可能是我的选择.)

SyncFusion 后台
(中等成本,具有合理的结构.不幸的是,在运行单元测试时,实现更加困难,结果不一致.还收到了许多尝试读取受保护的内存"错误,这并没有鼓励我使用纯托管库.)

I'm trying to find an appropriate way to read the contents of an Excel file on an NT server operating system. I have numerous problems using the Excel API and then came across the official Microsoft on Office Automation which states that the Excel API is not suitable for Excel automation. The sorts issues that I saw were similar to those described in the article.

Is there another way that I can read an Excel file (xls, xlsx, xlsm) on a server (no UI) in such a way that doesn't suffer the same sort of threading/security/license issues imposed within the Excel API?

解决方案

There were a number of libraries that were highlighted by different users that would allow the sort of functionality required. I've listed them here and some of these were evaluated so where appropriate I've tried to put down interesting comments for comparing them. The details I've included are completely opinion based, however any of these libraries would probably achieve the required goal.

SpreadsheetGear.Net
(Didn't evaluate due to high purchase cost)

Aspose.Cells
(Evaluated by a collegue. Appeared to be fairly simple to implement, performance comparable to Excel Interop).

GemBox
(Didn't evaluate)

Excel Services
(Seems only to be included in SharePoint 2007)

Excel Mapper (Didn't evaluate because it requires strongly typed objects to import into which didn't fit my requirement).

SmartXls
(Didn't evaluate because it requires strongly typed objects to import into which didn't fit my requirement).

ActiveXls
(Fairly easy to use, lack of Properties raises questions, they have a preference of Methods for trivial actions. Despite it's claim of 1M records a second was out performed by cheaper FlexCel. Have decided that the help/API manual is almost useless.)

Koogra
(Didn't evaluate due to finding no documentations/information)

FileHelpers
(Didn't evaluate)

Flexcel
(Lowest cost solution found, good performance and was simple to implement with a close proximity to Excel Interop structure. Also received quick response to technical question from support. Probably my pick of the bunch.)

SyncFusion BackOffice
(Medium cost and had a reasonable structure. Unfortunately had more difficulty implementing and inconsistent results when running unit tests. Also received a number of 'Attempted to read protected memory' errors, which didn't encourage me with purely managed library.)

这篇关于作为服务器进程读取 Excel 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆