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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridExcelConverterControl

Thread ID:

Created:

Updated:

Platform:

Replies:

101790 Nov 22,2011 02:44 AM UTC Dec 20,2011 12:55 AM UTC ASP.NET Web Forms (Classic) 6
loading
Tags: GridGroupingControl
Megan Clark
Asked On November 22, 2011 02:44 AM UTC

I am using GridExcelConverterControl to export a file to excel. A sample of the code is:
GridExcelConverterControl gecc = new GridExcelConverterControl();

if (grid != null)
{
gecc.GridToExcel(this.grid.Model,
workBook.Worksheets[0], ConverterOptions.ColumnHeaders);
}


Megan Clark
Replied On November 22, 2011 02:46 AM UTC

I am using GridExcelConverterControl to export a file to excel. A sample of the code is:
GridExcelConverterControl gecc = new GridExcelConverterControl();

if (grid != null)
{
gecc.GridToExcel(this.grid.Model,workBook.Worksheets[0], ConverterOptions.ColumnHeaders);
}



Megan Clark
Replied On November 22, 2011 02:51 AM UTC

I am using GridExcelConverterControl to export a file to excel. A sample of the code is:
GridExcelConverterControl gecc = new GridExcelConverterControl();

if (grid != null)
{
gecc.GridToExcel(this.grid.Model,workBook.Worksheets[0], ConverterOptions.ColumnHeaders);
}

The first time the file is saved, there are no issues. If the same data is saved multiple times the following error is received on either the second or third attempt:
"Index cannot be less than 0 and larger than Palette colors array size. Parameter name: index"

How do I prevent this error from occurring?


Megan Clark
Replied On November 22, 2011 02:51 AM UTC

I am using GridExcelConverterControl to export a file to excel. A sample of the code is:
GridExcelConverterControl gecc = new GridExcelConverterControl();

if (grid != null)
{
gecc.GridToExcel(this.grid.Model,workBook.Worksheets[0], ConverterOptions.ColumnHeaders);
}

The first time the file is saved, there are no issues. If the same data is saved multiple times the following error is received on either the second or third attempt:
"Index cannot be less than 0 and larger than Palette colors array size. Parameter name: index"

How do I prevent this error from occurring?


Ragamathulla B [Syncfusion]
Replied On November 23, 2011 05:12 PM UTC

Hi Megan,

Thanks for your interest in syncfusion products.

We are not able to see your reported issue in our current version. Please let me know you are currently using version. Thanks if any aditional information.

Let me know if you have any further concerns.

Regards,
Ragamathullah B.


Oliver Cole
Replied On December 19, 2011 11:26 AM UTC

I'm also experiencing this issue, on v9.304.0.61.

Here is the trace:

Index cannot be less than 0 and larger than Palette colors array size.
Parameter name: index
at Syncfusion.XlsIO.Implementation.WorkbookImpl.SetPaletteColor(Int32 index, Color color)
at Syncfusion.GridExcelConverter.GridExcelConverterBase.CheckColorAvailability(Color color, IRange range)
at Syncfusion.GridExcelConverter.GridExcelConverterBase.CopyFont(GridStyleInfo gridCell, IRange range)
at Syncfusion.GridExcelConverter.GridExcelConverterBase.CopyStyle(GridStyleInfo gridStyle, IRange destRange)
at Syncfusion.GridExcelConverter.GridExcelConverterBase.CopyStyles(GridModel grid, Int32 iRow, Int32 iColumn, GridStyleInfo gridCell, IRange range)
at Syncfusion.GridExcelConverter.GridExcelConverterControl.GridCellToExcel(GridModel grid, Int32 iRow, Int32 iColumn, IRange range)
at Syncfusion.GridExcelConverter.GridExcelConverterControl.GridToExcel(GridModel grid, IWorksheet sheet, ConverterOptions options)



Ragamathulla B [Syncfusion]
Replied On December 20, 2011 12:55 AM UTC

Hi Oli,

We regret for the inconvenience caused.

We have already logged a defect report regarding this issue and also i would request you to create a incident because we cant provide a patch via forum.

let me know if you have any further concerns.

Regards,
Ragamathullah B.


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.

Warning Icon 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.Close Icon

;