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))