Populating a print report with the Office2000 component does not support collections. (Exception from hresult:0x80020011 (disp_e_notacollection))

Source: Internet
Author: User

Environment: win2008 64-bit +.net4.0 +office2000

Error message:

Collections are not supported. (Exception from hresult:0x80020011 (disp_e_notacollection))
At System.RuntimeType.ForwardCallToInvokeMember (String membername, BindingFlags flags, Object target, int32[] aWrapperTypes, messagedata& Msgdata)
At Excel.Range.get_Value (Object rangevaluedatatype)
At Wfp.classlibrary.common.wfpexcel..ctor (byte[] modestream, String FilePath, String FileName, DataSet DS, String wfpuser)

Workaround reference:

Note: If you are running in vs.net to add a Excel.dll component, the Excel component Vs.net itself is not, and the following is the method for generating Excel.dll. 】

1. Make sure that the machine itself installs Office.

2. Copy the Excel9.olb file under [C:Program filesmicrosoft officeoffice: Default installation path] to the [c:visual studio.netsdkv1.1bin:vs.net installation path] path.

3. Open Visual Studio. Net2003 command prompt, run tlbimp excel9.olb Excel.dll, the C:visual component will be generated under [Studio.netsdkv1.1bin Excel.dll].

4. Adding a Excel.dll reference to the project is OK.

Copy the file to

C:\Program Files (x86) \reference Assemblies\microsoft\framework\. netframework\v4.0

Directory under

Start v2012 Developer Tips:

Execute tlbimp excel9.olb Excel.dll

Populating a print report with the Office2000 component does not support collections. (Exception from hresult:0x80020011 (disp_e_notacollection))

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.