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 David,
I beleive the samples are now in a separate installer - the NetAdvantage SDK. You should be able to download it here: My Infragistics Keys and Downloads - Download Anything and Everything You Own
Duplicate
Hi Mike Saltzman,
I couldn't get your point. What i have understood so far is, in order to export rows that greater than 66K to Excel 2007 using CLR 2.0, we need IPackageFactory. I downloaded the solution(Excel 2007 Custom Packaging CS) but still i am not able to run. I could not build windowsbase.dll using .Net 2.0. Could you please advise on how to use IPackageFactory with 2.0?
I am not saying that some third party component should implement the interface.
In order to create a file compatible with Excel 2007 format, the file has to be packaged. CLR 3 provides built-in packaging functionality, so if you are using CLR3, the Infragistics Excel assemblies can utilize this in order to create Excel files for you.
But if you are using CLR2, then there is no support for packaging. Therefore, the Infragistics components cannot create an Excel file.
So.. in order to allow you the possibility of creating an Excel file in CLR2, the Excel assembly exposes an interface that you can implement so that you can do the packaging yourself. You could, theoretically, write your own packaging routines to packages the files. Or, you could use some other 3rd-party packaging utility.
Then, when the interface is called to package the file, you could handle the packaging however you want since the Infragistics components are unable to do it.
The sample provided is a sample of how to use the interface. Once again, since there is no support in the CLR2 framework to package the files, and the sample can't reply on any third-party software, it uses the CLR3 packaging functionality for demonstration purposes. All it's intended to demonstrate is that when the interface methods are called, it's up to you to package or un-package the files.
Hi Mike,
I really don't understand why a third-party utility should implement an Infragistics-defined interface... There's no documentation available on what the implementing object should do... If you provide a method to load an Excel document, what should the object do?
Dialogues, I can tell you for sure that on a pure .NET 2.0 environment the Infragistics sample won't work. So the best choice is to deploy WindowsBase.dll with your application (but it sound really strange, since - you're right - it's a part of the framework...).
Bye, Valentina
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.