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.

WinForms Grid ->Exporting to Excel 2007 using release 6.3.0.6

Thread ID:

Created:

Updated:

Platform:

Replies:

93709 Mar 30,2010 10:38 AM Mar 31,2010 04:57 AM Windows Forms 1
loading
Tags: GridControl
Jeff
Asked On March 30, 2010 10:38 AM

Was wondering if anyone could supply some answers to the following question:


Does the Windows Grid in Syncfusion 6.3.0.6 support exporting to Excel 2007 formats? We want to migrate our windows application away from using Excel 2003 to Excel 2007. Updating our version of syncfusion is not currently in project scope.


I am guessing this relates to the following object in the supporting namespace :

GridExcelConverterControl


Would appreciate any documentation/information/limitations.


thanks.


JC

Jisha Joy [Syncfusion]
Replied On March 31, 2010 04:57 AM

Hi Jeff,

Yes. Essential Studio v6.3.0.6 support export to Excel 2007. To convert the grid content to an Excel 2007, you have to explicitly set the ExcelVersion by creating an XlsIO application and exporting the grid contents to its sheet. See the code:

ExcelEngine engine = new ExcelEngine();
IApplication app = engine.Excel.Application;
app.DefaultVersion = ExcelVersion.Excel2007;
IWorkbook book = app.Workbooks.Create();
GroupingGridExcelConverterControl gecc = new GroupingGridExcelConverterControl();
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = 'Files(*.xlsx)|*.xlsx';
saveFileDialog.DefaultExt = '.xlsx';
if (saveFileDialog.ShowDialog() == DialogResult.OK)
{
gecc.GroupingGridToExcel(this.gridGroupingControl1, book.Worksheets[0], ConverterOptions.Visible);
book.SaveAs(saveFileDialog.FileName);
if (MessageBox.Show('Do you wish to open the xls file now?', 'Export to Excel', MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
Process proc = new Process();
proc.StartInfo.FileName = saveFileDialog.FileName;
proc.Start();
}
}

Sample for your reference:

http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=ExcelExport833503208.zip

Please let me know if this helps.


Regards,
Jisha

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.

;