Bug #102226 Input array is longer than the number of columns in this table.
Submitted: 12 Jan 2021 4:42 Modified: 12 Jan 2021 8:57
Reporter: Vijaykuamr kolli Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL for Windows: MySQL for Excel Severity:S1 (Critical)
Version:1.3.8 OS:Windows
Assigned to: CPU Architecture:x86
Tags: Excel

[12 Jan 2021 4:42] Vijaykuamr kolli
Description:
Importing a procedure data into excel using mysql for excel plugin and when re-opening the excel i am getting below error.

Exception message:
Input array is longer than the number of columns in this table.

Exception thrown by:
MySqlDataTable.CopyTableData

Stack trace:
   at System.Data.DataTable.NewRecordFromArray(Object[] value)
   at System.Data.DataTable.LoadDataRow(Object[] values, Boolean fAcceptChanges)
   at MySQL.ForExcel.Classes.MySqlDataTable.CopyTableData(DataTable fromSourceTable, Boolean preserveChanges)

How to repeat:
Steps to replicate:

1. open excel 
2. Go to Data tab and Click on Mysql For Excel plugin
3. Import City table and the Category table from shakila schema. Save the excel and open the same excel again. It works fine. No issues with it.

4. Import using procedure 'film_in_stock' from sakila schema.

p_film_id =5 ; p_store_id=2  - Result got 1 coulmn(inventory_id) with 2 rows of data.

5. Save the excel and re-open the same excel. I am getting below error

Exception message:
Input array is longer than the number of columns in this table.

Exception thrown by:
MySqlDataTable.CopyTableData

Stack trace:
   at System.Data.DataTable.NewRecordFromArray(Object[] value)
   at System.Data.DataTable.LoadDataRow(Object[] values, Boolean fAcceptChanges)
   at MySQL.ForExcel.Classes.MySqlDataTable.CopyTableData(DataTable fromSourceTable, Boolean preserveChanges)

Suggested fix:
Could you please provide the solution for this issue.

I am invoking a Powershell script to auto update the excel dashboard. I couldn't complete my functionality because of this error.

Please help me on this.

Thanks,
Vijay
[12 Jan 2021 6:13] MySQL Verification Team
Hello Vijaykuamr kolli,

Thank you for the report.

regards,
Umesh
[12 Jan 2021 8:56] Vijaykuamr kolli
Hi
[12 Jan 2021 8:57] Vijaykuamr kolli
Hi Umesh,

Do you have any suggestions or solution for this issue. 

Thanks,
Vijay