Hi ,I come from china.little pg use netadvantage sdk in china,so i need your help.
my english is very poor,so need your forgiveness.
when i save excel2007 file using Workbook. Save(string fileName) in netadvantage10.2;
there is a err:
packageFactory cannot be null. When saving to Excel2007 workbook format and using the Infragistics2.Excel assembly,
you must provide an IPackageFactory to handle the packaging of data.
If you are using the DotNet Framework 3.0 or higher,
use the Infragistics3.Excel assembly instead,
and the packaging will be handled by the WindowsBase class
i dont konw how to use the interface IPackageFactory .
ps: code is more helpful than words;
thanks.
Hi,
What version of Visual Studio are you using?
If you are using CLR3 or higher, then you do not need to create your own PackageFactory. All you have to do is change your project references to the correct version of Infragistics Excel and UltraGridExcelExporter assemblies.
If you are using an older version, then you can still export to Excel2003 format without a PackageFactory.
If not, then you would need to either write or purchase a third-part compression library and write your own IPackageFactory class to handle compressing and de-compressing the Excel files.There's no way I can provide you with any sample code for this, because it relies on third-party code.
Hi Mike,
I am using VS2008 and dot net framework 3.5 and I am using dll having following dlls
Name: Infragistics.Excel
Runtime Version: v2.0.50727
Version: 10.3.20103.1000
When I am trying to export to excel 2007 I am also getting the same error. The code I am uising to Export is
ultraGridExcelExporter.Export(
.Excel2007);
Exception: packageFactory cannot be null. When saving to Excel2007 workbook format and using the Infragistics2.Excel assembly, you must provide an IPackageFactory to handle the packaging of data. If you are using the DotNet Framework 3.0 or higher, use the Infragistics3.Excel assembly instead, and the packaging will be handled by the WindowsBase class
Please let me know what is going on wrong here.
Thanks & Regards,Girish Nehte
This is a known bug in the Versionless assembly. The assembly was built using CLR2 instead of CLR3, and so it cannot access any built-in packaging support in the DotNet Framework.
You will need to get the latest service release.
How to get the latest service release - Infragistics Community
With the error that I am getting and your reply to my post i understand that I have to
I am sorry if I have misinterpreted anything. I have got the latest release. name of the setup file is ""NetAdvantage_WinForms_20103.2094_SR.msp". I have installed it. Now in the installation folder In "Bin - Signed" folder I found a zip file "20103_WinForms_CLR2x_Signed.zip"
Does that means that I did not have correct setup / release? Does that mean that assemblies are build in CLR2?
As per your reply I need assemblies build in CLR3. If this is not correct release that i have then in correct release do I get versionless assemblies build in CLR3 or do I have to use infragistic3.excel{some version}.dll assemblies?
Please answer my confusions. I am sorry if I have asked oyu lot of stuff in one go.
Hi Girish,
I am not saying that you need to use a versioned assembly. That is, you do not need to use Infragsitics3.excel{some version}.dll. You can use the dll without the version number it in.
You just need to make sure you use the versionless assembly with the same name as the one you were already using. But make sure you use the one that is installed with the service release and not the original one.
Thanks Brian,
The issue is resolved. Thanks for all the help from Infragistics.
Thanks & Regrda,Girish Nehte
Hello Girish,
If you are using the "version free" assemblies, i.e. the asemblies that start with only "Infragistics" and do not have "v10.3" in their name, then you can get the updated Infragistics.Excel.dll from the updated 20103_WinForms_VersionFree.zip file. This zip is, by default, found in C:\Program Files (x86)\Infragistics\NetAdvantage 2010.3\Windows Forms\Version-Free. Once your project is using the service release version of the dlls, then it should resolve the issue.
If you are using the assemblies that start with "Infragistics2" or "Infragistics3" and have "v10.3" in their name, then you can find them in the Bin folder which is, by default, located at C:\Program Files (x86)\Infragistics\NetAdvantage 2010.3\Windows Forms\Bin. You would use the Infragistics3.Excel.v10.3.dll in your project.
To get yourself corrected, you should use your service release version, 2094, for all of the assemblies you are referencing. You should also make sure that you are using either all of the version free assemblies or all of the versioned assemblies. This should get you back into a consistent state within the project and help resolve the issue.
The "Signed" assemblies from the "Bin - Signed" folder that you mentioned are the same assemblies found in the Bin folder with the exception of being digitally signed with a VeriSign code signing certificate.
I have got the latest release. Name of the setup file is ""NetAdvantage_WinForms_20103.2094_SR.msp". I have installed it. Now in the installation folder In "Bin - Signed" folder I found a zip file "20103_WinForms_CLR2x_Signed.zip" I have tried replacing my assembly to the new assembly (version free)installed by release but still I am getting the same error
Does name of the zip file indicates that assemblies are build in CLR2?Does that mean that I did not have correct setup / release?
I request you to please confirm this?