Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
About IPackageFactory Using
posted

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.

 

Parents
  • 469350
    Offline posted

    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.

     

Reply Children