I am trying to write an option to export my grid to excel. It is quite a complex grid with covered cells and borders etc. If i do
I get a divide by zero.
Excel gives an error in its paste function
Works. Is there a way for me to dump the grid colours, layout and all into excel?
ADAdministrator Syncfusion Team August 12, 2003 03:07 AM
Currently Essential Grid only supports 2 clipboard formats, an internal GridData format, and a DataFormats.Text format (tab separated text with newlines for rows). So, currently the only format that Excel can use is the text format. This only supports the text copying, and not cell colors, etc.
We are working on supporting BIFF formats, so in the future you would be able to copy more than text. Biff support will not be in the upcoming 2.0 release, but should be available shortly thereafter.
You can call range.ExpandRange on a range object to make sure it is a cell range so the Copy has a fixed set cesll to work with.
private void button1_Click(object sender, System.EventArgs e)
GridRangeInfo range = GridRangeInfo.Col(1);
range = range.ExpandRange(1, 1, this.gridDataBoundGrid1.Model.RowCount-1, this.gridDataBoundGrid1.Model.ColCount);