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.

copy/paste data to excel from gridGroupingControl

Thread ID:

Created:

Updated:

Platform:

Replies:

65936 Jul 27,2007 04:38 PM Jul 31,2007 10:08 AM Windows Forms 4
loading
Tags: GridControl
Wen Jiang
Asked On July 27, 2007 04:38 PM

Syncfusion 4.4.

I need to design the functionality that copy and paste data (whole table or a range) from gcc to excel. It seems gridControl provides this functionality directly. But gcc doesn't.

Thanks for help in advance.

Wen

Rajagopal [Syncfusion]
Replied On July 27, 2007 07:00 PM

Hi Wen,

The GroupingGridExcelConverterControl class is used to convert the contents of GridGroupingControl to excel. Please make sure to include the XlsIO libraries in your project to have this support.

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl();
converter.GroupingGridToExcel(gridGroupingControl1,"Test.xls", Syncfusion.GridExcelConverter.ConverterOptions.Default);

Here is a sample for your reference
http://www.syncfusion.com/Support/user/uploads/ExcelExport_38d2e14c.zip

Let me know if this helps.
Thanks for using Syncfusion Products.

Regards,
Rajagopal

wen
Replied On July 29, 2007 05:47 PM

Hi Rajagopal,

Thank you for your reply. In fact I knew there is no problem to save content of gcc as an excel file. As the subject says, I want the functionality to copy and paste data from gcc to excel, instead of saving as a file.

Thanks a lot,
Wen



>Hi Wen,

The GroupingGridExcelConverterControl class is used to convert the contents of GridGroupingControl to excel. Please make sure to include the XlsIO libraries in your project to have this support.

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl();
converter.GroupingGridToExcel(gridGroupingControl1,"Test.xls", Syncfusion.GridExcelConverter.ConverterOptions.Default);

Here is a sample for your reference
http://www.syncfusion.com/Support/user/uploads/ExcelExport_38d2e14c.zip

Let me know if this helps.
Thanks for using Syncfusion Products.

Regards,
Rajagopal

Rajagopal [Syncfusion]
Replied On July 30, 2007 04:28 PM

Hi Wen,

The GridGroupingControl.TableModel.ClipboardCopy is the event that gets triggered when copy operation(Ctrl+C) is done. By default, doing ctrl+c will only copy the current cell to the clipboard. If you want to copy something else, say a range of cells/selected records, then in the grid.TableModel.ClipboardCopy event get the Table.SelectedRecords of the corresponding table and put them on the Clipboard.

Here is a small sample to show you how to copy the selected records/wholetable to the clipboard which you can use it to paste in the excel sheet.

http://websamples.syncfusion.com/samples/Grid.Windows/F65936/GGC_CopyRecs.zip

Let me know if this helps.

Regards,
Rajagopal

Wen Jiang
Replied On July 31, 2007 10:08 AM

Hi, Rajagopal,

Thanks! This is helpful.

Wen

>Hi Wen,

The GridGroupingControl.TableModel.ClipboardCopy is the event that gets triggered when copy operation(Ctrl+C) is done. By default, doing ctrl+c will only copy the current cell to the clipboard. If you want to copy something else, say a range of cells/selected records, then in the grid.TableModel.ClipboardCopy event get the Table.SelectedRecords of the corresponding table and put them on the Clipboard.

Here is a small sample to show you how to copy the selected records/wholetable to the clipboard which you can use it to paste in the excel sheet.

http://websamples.syncfusion.com/samples/Grid.Windows/F65936/GGC_CopyRecs.zip

Let me know if this helps.

Regards,
Rajagopal

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.

;