none
Importing Data Into Excel Throws Error 0x800A03EC RRS feed

  • Question

  • I am now optimizing a program which used to import data into Excel cell by cell.  I want it to do column by column, so that it can save about half of the executing time.  Since I need to execute VBA script after data import, I use Microsoft.Office.Interop.Excel creating an application to do it.

    I am now first filling an Array with one column in the data, and then use "Worksheet.get_range().set_Value(Array)" to import.  This code worked well at the beginning, until one column in the data became long strings. The error 0x800A03EC was thrown all the times, and just disappeared when I removed the long strings from the data. I have tried rollback the code to import data cell by cell, and the error disappeared as well.

    I did some research and found this problem only happens when importing data in batches. So I intend to import data column by column when there is no long string, but cell by cell when there is any.  

    Problem is, I DON'T KNOW WHAT IS THE MAXIMUM LENGTH :(

    Does anyone have done any research about this?  Much appreciated if there is a exact number.

    • Moved by Kristin Xie Monday, January 25, 2016 3:30 AM excel related
    Friday, January 22, 2016 6:31 AM

All replies