简体   繁体   English

F#Excel-新ApplicationClass上的错误

[英]F# Excel - error on new ApplicationClass

When I do just 当我刚做

type RExcel() = 
    let xlApp = new ApplicationClass()

I've got this Error : 我有这个错误:

Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Класс не зарегистрирован (Class doesn'registered) (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). 由于以下错误,检索具有CLSID {00024500-0000-0000-C000-000000000046}的组件的COM类工厂失败:80040154Класснезарегистрирован(未注册类)(HRESULT的异常:0x80040154(REGDB_E_CLASSNOTREG))。

So maybe I can realize Excel read/write functions some another way. 因此,也许我可以通过其他方式实现Excel读/写功能。

Added : installed OpenOffice... Version of assembler is 14 ... Maybe I need to use some another .NET library for Excel ? 添加:已安装的OpenOffice ...汇编程序的版本是14 ...也许我需要为Excel使用另一个.NET库?

I'm not sure I correctly understand your scenario, but if you want to call Excep using ApplicationClass , you need to have full Excel installed on your machine (and all users of your application will need to install Excel too). 我不确定我是否正确理解了您的情况,但是如果您想使用ApplicationClass调用Excep,则需要在计算机上安装完整的Excel(并且应用程序的所有用户也需要安装Excel)。 The library is just a wrapper that calls some internal functionality in Excel. 该库只是一个包装,它调用Excel中的某些内部功能。

If you want to generate Excel files in F# directly, you can take a look at libraries that generate XLSX (new XML-based format) files. 如果要直接使用F#生成Excel文件,可以查看生成XLSX(基于XML的新格式)文件的库。 For example: http://epplus.codeplex.com/ This should be easy to use from F# and should not have any other requirements. 例如: http : //epplus.codeplex.com/在F#中应该易于使用,并且没有其他要求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM