Excel Import Problem
steve-sheppard opened this issue · comments
I exported to excel format, set one value, then when I try to import I get an error. I'm using LibreOffice to edit the file, could that be the problem?
This is the file I'm importing:
newTestLocal.xlsx
Here are the details from the error:
System.InvalidOperationException
There is an error in XML document (2, 1397).
at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)
at Net.SourceForge.Koogra.Excel2007.OX.OXNS.Load[X](ZipFile f, String path)
at Net.SourceForge.Koogra.Excel2007.Workbook.ProcessGetWorksheet(OXWorkbookWorksheetEntry e)
at Net.SourceForge.Koogra.Excel2007.Workbook.d__0.MoveNext()
at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.CoreExcel2.CoreExcelImporter.ImportExcelFromFile(String filePath) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\CoreExcel2\CoreExcelImporter.cs:line 17
at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Import.ExcelImportController.DetectFileGroupsFromExcelFile(Project project, String filePath) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\Import\ExcelImportController.cs:line 53
at ZetaResourceEditor.UI.ExportImportExcel.ExcelImportWizardForm.parseFileGroups() in c:\P\ZetaResourceEditor\Source\Main\UI\ExportImportExcel\ExcelImportWizardForm.cs:line 360
at ZetaResourceEditor.UI.ExportImportExcel.ExcelImportWizardForm.buttonBrowse_Click(Object sender, EventArgs e) in c:\P\ZetaResourceEditor\Source\Main\UI\ExportImportExcel\ExcelImportWizardForm.cs:line 351
at System.Windows.Forms.Control.OnClick(EventArgs e)
at DevExpress.XtraEditors.BaseButton.OnClick(EventArgs e)
at DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)
at DevExpress.XtraEditors.BaseControl.WndProc(Message& msg)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)InvalidOperationException
{
Message="There is an error in XML document (2, 1397).",
Data=
[
]
,
InnerException=FormatException
{
Message="Input string was not in a correct format.",
Data=
[
]
,
InnerException=null,
TargetSite=RuntimeMethodInfo: StringToNumber,
StackTrace=" at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)\r\n at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read5_OXRow(Boolean isNullable, Boolean checkType)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read6_OXWorksheet(Boolean isNullable, Boolean checkType)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read7_worksheet()",
HelpLink=null,
Source="mscorlib",
HResult=-2146233033
},
TargetSite=RuntimeMethodInfo: Deserialize,
StackTrace=" at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)\r\n at System.Xml.Serialization.XmlSerializer.Deserialize(Stream stream)\r\n at Net.SourceForge.Koogra.Excel2007.OX.OXNS.Load[X](ZipFile f, String path)\r\n at Net.SourceForge.Koogra.Excel2007.Workbook.ProcessGetWorksheet(OXWorkbookWorksheetEntry e)\r\n at Net.SourceForge.Koogra.Excel2007.Workbook.d__0.MoveNext()\r\n at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.CoreExcel2.CoreExcelImporter.ImportExcelFromFile(String filePath) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\CoreExcel2\CoreExcelImporter.cs:line 17\r\n at ZetaResourceEditor.RuntimeBusinessLogic.ExportImportExcel.Import.ExcelImportController.DetectFileGroupsFromExcelFile(Project project, String filePath) in c:\P\ZetaResourceEditor\Source\RuntimeBusinessLogic\ExportImportExcel\Import\ExcelImportController.cs:line 53\r\n at ZetaResourceEditor.UI.ExportImportExcel.ExcelImportWizardForm.parseFileGroups() in c:\P\ZetaResourceEditor\Source\Main\UI\ExportImportExcel\ExcelImportWizardForm.cs:line 360\r\n at ZetaResourceEditor.UI.ExportImportExcel.ExcelImportWizardForm.buttonBrowse_Click(Object sender, EventArgs e) in c:\P\ZetaResourceEditor\Source\Main\UI\ExportImportExcel\ExcelImportWizardForm.cs:line 351\r\n at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n at DevExpress.XtraEditors.BaseButton.OnClick(EventArgs e)\r\n at DevExpress.XtraEditors.BaseButton.OnMouseUp(MouseEventArgs e)\r\n at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at DevExpress.Utils.Controls.ControlBase.WndProc(Message& m)\r\n at DevExpress.XtraEditors.BaseControl.WndProc(Message& msg)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)",
HelpLink=null,
Source="System.Xml",
HResult=-2146233079
}
-->Input string was not in a correct format.System.FormatException
Input string was not in a correct format.
at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read5_OXRow(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read6_OXWorksheet(Boolean isNullable, Boolean checkType)
at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read7_worksheet()FormatException
{
Message="Input string was not in a correct format.",
Data=
[
]
,
InnerException=null,
TargetSite=RuntimeMethodInfo: StringToNumber,
StackTrace=" at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal)\r\n at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read5_OXRow(Boolean isNullable, Boolean checkType)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read6_OXWorksheet(Boolean isNullable, Boolean checkType)\r\n at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReaderOXWorksheet.Read7_worksheet()",
HelpLink=null,
Source="mscorlib",
HResult=-2146233033
}
Thanks for taking a look.
I've changed the Excel import library to another one. Now your document seems to be imported correctly.
The new setup (2.3.0.11) is already published. Direct download link.
Could you please send me your whole project so I can debug what's going on?
That's the project directory, and the excel file is there too. Let me know if you need anything else. Thanks again for the trouble!
There are no RESX files referenced in your project.
This looks suspicious to me.
Where did you expect that the Excel file will be imported into, if not RESX files?
I opened the RESX files from my visual studio project. Do they need to be in the project directory? Anyway, these are the files:
Just published another setup that fixes an issue in the newly used Excel import library.
I'm now able to select languages.
Please download setup 2.3.0.12.
Working great now. Thank you.