I can't find the example on to configure v2008.3 to allow the Excel functionality to be used in .NET 2.0.
I would like to use this functionality but am required to use .Net 2.0.
Is there a post describing the configuration?
Hi,
You can export the grid to Excel or use the Excel assembly to create Excel files in CLR2.0. The only limitation is that you cannot create Excel 2007 files - you have to use the older Excel2003 format.
If you want to use Excel2007, then you need to have a way to package the Excel files. CLR3.5 has assemblies that will do this for you. If you don't have access to those assemblies, then you would need to either write your own or use some other 3rd-party packaging assemblies. There is a sample included with the NetAdvantage SDK that demonstrates how this can be done. The sample, uses the CLR3.5 assemblies, since it obviously does not have access to any 3rd-party utlities. So you would need to replace the references to those CLR3.5 assemblies with whatever 3rd-party tool you are using.
The sample is called "Excel 2007 Custom Packaging" and it's under the WinMisc samples.
Where can I find the samples that you are referring to? The samples in NetAdvantage 2009.1 do not include the "Excel 2007 Custom Packaging" sample that you are referring to.
Regards,
David
Hi Valentina,
You need indeed to create a class that implements IPackagefactory.
To find the sample, you must download and install Infragistics NetAdvantage samples.
Then, the sample you should use is into WinMisc\CS\Excel 2007 Custom Packaging CS.
I've been using it for months and it seems to work.
Hope that helps
regards.
Dialogues
Hi Dialogues,
and so you're using the Infragistics sample as is? 'cause it's a bit strange: it targets .NET Framework 2.0, but it requires as a reference an assembly that comes with 3.0 installation: WindowsBase.dll ('Copy Local' is set to false, so this will not be deployed with the application...).
Are you sure your users can use your app's Excel functionality simply having .NET Framework 2.0 installed?
Thank you and sorry for the many questions... bye! Valentina
Yes, I use it as is, it surprised me the same way as you've been surprised... but it works (I believe) only usig the CLR2.0.
In fact I think you made a mistake because the WindowsBase.dll that is referenced is using the Runtime v2.0 but the version of the dll is 3.0...
I think the dll is not to deploy because it's part of the framework.
There's no way Infragistics can supply an example of implementing your own IPackageFactory in any real way, because it would require some third-party packaging utility. So the sample that is included demonstrates using an IPackageFactory with the packaging support built-in to CLR3. It uses CLR3 because the same can only demonstrate implementing the interface, not the actual packaging. So if you intend to implement your own packaging, you either need a third-party packaging utility or you have to write your own packaging routines to package the data in a way that is compatible with Excel.
Duplicate