We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Excel Cell manipulation

Thread ID:

Created:

Updated:

Platform:

Replies:

57875 Mar 13,2007 09:12 AM Mar 13,2007 10:32 AM ASP.NET Web Forms (Classic) 1
loading
Tags: GridGroupingControl
David
Asked On March 13, 2007 09:12 AM

Morning,
I have a need to programmatically manipulate an Excel object to some very specific requirements. I have done this with Excel interop and the customer liked what they saw however we all know the issues with interop. Thus we purchased Syncfusion but can’t seem to get the same kind of detailed control over the Syncfusion’s Excel object.

When the data is returned form the database, I need to add a row if there are certain type of records, if not I don’t need to add this header row. The rest of the records returned can be one of three types all needing their own header row. Attached is a sample spreadsheet. They want it exactly as it is shown. Like I previously mentioned, I did a proof of concept using interop and they liked the results so I know it can be done.

Using interop I used this:

//Excel Objects
Microsoft.Office.Interop.Excel.Application oXLApplication;
Microsoft.Office.Interop.Excel._Workbook oWorkBook;
Microsoft.Office.Interop.Excel._Worksheet oSheet;

//Range objects for cell manipulation
Microsoft.Office.Interop.Excel.Range oRng;
Microsoft.Office.Interop.Excel.Range oCV;
Microsoft.Office.Interop.Excel.Range[] oRngCV = new Microsoft.Office.Interop.Excel.Range[0];

Using Syncfusion:

GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
ExcelEngine oExcelEngine = new ExcelEngine();
IApplication oApplication = new ExcelEngine().Excel;
IWorkbook oWorkbook = new ExcelEngine().Excel.Workbooks.Add();
IWorksheet oSheet = new ExcelEngine().Excel.ActiveSheet;

These declarations seem to work fine. This issue is when I try to declare the Range objects. I need two range objects and a range array. Any assistance would be greatly appreciated.

Thanks,
Dave


SampleReport.zip

David
Replied On March 13, 2007 10:32 AM

I posted this in the wrong forum - I'll move it over to the XlsIO forum...

>Morning,
I have a need to programmatically manipulate an Excel object to some very specific requirements. I have done this with Excel interop and the customer liked what they saw however we all know the issues with interop. Thus we purchased Syncfusion but can’t seem to get the same kind of detailed control over the Syncfusion’s Excel object.

When the data is returned form the database, I need to add a row if there are certain type of records, if not I don’t need to add this header row. The rest of the records returned can be one of three types all needing their own header row. Attached is a sample spreadsheet. They want it exactly as it is shown. Like I previously mentioned, I did a proof of concept using interop and they liked the results so I know it can be done.

Using interop I used this:

//Excel Objects
Microsoft.Office.Interop.Excel.Application oXLApplication;
Microsoft.Office.Interop.Excel._Workbook oWorkBook;
Microsoft.Office.Interop.Excel._Worksheet oSheet;

//Range objects for cell manipulation
Microsoft.Office.Interop.Excel.Range oRng;
Microsoft.Office.Interop.Excel.Range oCV;
Microsoft.Office.Interop.Excel.Range[] oRngCV = new Microsoft.Office.Interop.Excel.Range[0];

Using Syncfusion:

GroupingGridExcelConverterControl ggExcelConverter = new GroupingGridExcelConverterControl();
ExcelEngine oExcelEngine = new ExcelEngine();
IApplication oApplication = new ExcelEngine().Excel;
IWorkbook oWorkbook = new ExcelEngine().Excel.Workbooks.Add();
IWorksheet oSheet = new ExcelEngine().Excel.ActiveSheet;

These declarations seem to work fine. This issue is when I try to declare the Range objects. I need two range objects and a range array. Any assistance would be greatly appreciated.

Thanks,
Dave


SampleReport.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;