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