4
Vote

Unhandled exception during Export to MS Excel

description

I have just loaded about ten resource files and tried to export them to Excel. My longest string is 778 chars long (including spaces) and it has some return characters which may be causing a problem.

System.ArgumentException

Value was either too large or too small for an Int32.Couldn't store <17123240811> in Group Column. Expected type is Int32.

at System.Data.DataColumn.set_Item(Int32 record, Object value)
at System.Data.DataRow.set_Item(DataColumn column, Object value)
at System.Data.DataRow.set_Item(Int32 columnIndex, Object value)
at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Export.ExcelExportController.doProcess(PreparedInformation preparedInformation, BackgroundWorker bw, Int32 fileGroupsLength, ICollection`1 savedFiles) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\Export\ExcelExportController.cs:line 579
at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Export.ExcelExportController.Process(BackgroundWorker bw) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\Export\ExcelExportController.cs:line 307
at ZetaResourceEditor.UI.ExportImportExcel.ExcelExportWizardForm.progressBackgroundWorker_DoWork(Object sender, DoWorkEventArgs e) in c:\P\ZetaResourceEditor\Source\Main\UI\ExportImportExcel\ExcelExportWizardForm.cs:line 758
at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

ArgumentException
{
Message="Value was either too large or too small for an Int32.Couldn\\'t store <17123240811> in Group Column.  Expected type is Int32.",
ParamName=null,
Data=
[
]
,
InnerException=OverflowException
{
    Message="Value was either too large or too small for an Int32.",
    Data=
    [
    ]
,
    InnerException=null,
    TargetSite=RuntimeMethodInfo: ToInt32,
    StackTrace="   at System.Convert.ToInt32(Int64 value)\\r\\n   at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider)\\r\\n   at System.Data.Common.Int32Storage.Set(Int32 record, Object value)\\r\\n   at System.Data.DataColumn.set_Item(Int32 record, Object value)",
    HelpLink=null,
    Source="mscorlib"
},
TargetSite=RuntimeMethodInfo: set_Item,
StackTrace="   at System.Data.DataColumn.set_Item(Int32 record, Object value)\\r\\n   at System.Data.DataRow.set_Item(DataColumn column, Object value)\\r\\n   at System.Data.DataRow.set_Item(Int32 columnIndex, Object value)\\r\\n   at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Export.ExcelExportController.doProcess(PreparedInformation preparedInformation, BackgroundWorker bw, Int32 fileGroupsLength, ICollection`1 savedFiles) in c:\\P\\ZetaResourceEditor\\Source\\RuntimeBusinessLogic\\ExportImportExcel\\Export\\ExcelExportController.cs:line 579\\r\\n   at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Export.ExcelExportController.Process(BackgroundWorker bw) in c:\\P\\ZetaResourceEditor\\Source\\RuntimeBusinessLogic\\ExportImportExcel\\Export\\ExcelExportController.cs:line 307\\r\\n   at ZetaResourceEditor.UI.ExportImportExcel.ExcelExportWizardForm.progressBackgroundWorker_DoWork(Object sender, DoWorkEventArgs e) in c:\\P\\ZetaResourceEditor\\Source\\Main\\UI\\ExportImportExcel\\ExcelExportWizardForm.cs:line 758\\r\\n   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)\\r\\n   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)",
HelpLink=null,
Source="System.Data"
}
-->Value was either too large or too small for an Int32.System.OverflowException

Value was either too large or too small for an Int32.

at System.Convert.ToInt32(Int64 value)
at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Data.Common.Int32Storage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object value)

OverflowException
{
Message="Value was either too large or too small for an Int32.",
Data=
[
]
,
InnerException=null,
TargetSite=RuntimeMethodInfo: ToInt32,
StackTrace="   at System.Convert.ToInt32(Int64 value)\\r\\n   at System.Int64.System.IConvertible.ToInt32(IFormatProvider provider)\\r\\n   at System.Data.Common.Int32Storage.Set(Int32 record, Object value)\\r\\n   at System.Data.DataColumn.set_Item(Int32 record, Object value)",
HelpLink=null,
Source="mscorlib"
}

comments

DerSeegler wrote Nov 4, 2013 at 8:09 AM

Getting this problem too and hav eno idea how to fix or bypass it. Even if i try to export only one ressource file with almost nothing in it (20 chars top per cell) it gives me this error.

wrote Nov 4, 2013 at 8:09 AM

wrote Nov 27, 2013 at 9:37 AM

loomax wrote Jul 12, 2014 at 7:10 PM

Same issue here -- is there any way to get the excel export running ?

wrote Jul 12, 2014 at 7:10 PM

DerSeegler wrote Jul 12, 2014 at 10:14 PM

loomax I would recommend using RESX Manager (https://resxmanager.codeplex.com/). Its up to date, works perfectly and is super fast