Topic Thread

Expand all | Collapse all

Excel VBO Error ("Cannot find column X")

  • 1.  Excel VBO Error ("Cannot find column X")

    Posted 05-08-2017 08:47
    I just want to inquire about an issue we are encountering with regards to a process that uses Excel VBO on a Windows 10 environment with Office 365. The step is that we are trying to copy a range of cells from an excel file and we are using an action stage to pass parameters to action Get Worksheet Range as Collection. The premise is, this stage works on Windows 7 with Office 2013, but an issue arises when we run on the environment I have indicated above. For example, if we are trying to copy a range of A1:AL960, everything works fine. Beyond that (A1:AL961) we get the error "Internal : Could not execute code stage because exception thrown by code stage : Cannot find column 38.". There are different levels that this error occurs and I have findings that this is not connected to any maximum numbers of cells that is allowable to be copied. For example, A1:AL960 is 3640 cells. While A1:V3524 is 81052 cells and both ranges works. Although, one additional row would give us the error. The VBO object we are using is GetWorksheetRangeAsCollection. Any ideas? or has anyone experienced this in the past? Thanks a lot...


  • 2.  Is there anything odd about

    Posted 05-08-2017 15:01
    Is there anything odd about the column headers? GetWorksheetRangeAsCollection wants to create a .Net datatable before passing the output as a collection. So if, for example, there is a header with invalid characters for a column name in the datatable, you might see errors like this.


  • 3.  Hi John,

    Posted 05-08-2017 15:56
    Hi John, Nothing is unusual in terms of the headers in terms of the format and the naming. All columns are being captured successfully, from A1 until AL960. When pushed to AL961 though, we are getting the error. Thanks in advance for ideas, experiences...


  • 4.  RE: Hi John,

    Posted 02-28-2020 07:37
    If you know the column limits(range), then try MS Excel VBO::Get Worksheet as Collection Offset. it works for me.

    ------------------------------
    Vivek Goel
    "If you like this post, please press the "Recommend" Button.
    ------------------------------



  • 5.  RE: Excel VBO Error ("Cannot find column X")

    Posted 09-21-2019 12:40
    Any update? 
    I have a same issue. When using business object "get workseet as collection", the error "Cannot find column X" occurred.

    ------------------------------
    Haegeun Kim
    Manager
    F&F
    ------------------------------



  • 6.  RE: Excel VBO Error ("Cannot find column X")

    Posted 02-25-2020 12:10
    Hello,

    Internal : Could not execute code stage because exception thrown by code stage: Cannot find column 7

    I am having the same issue. There is nothing in the headers that is an invalid character.

    7 columns but there is over 40000 rows. How exception be rectified.
    I have tried get worksheet range as collection and get worksheet as collection.

    ------------------------------
    Ebony Hedgepeth
    ------------------------------



  • 7.  RE: Excel VBO Error ("Cannot find column X")

    Posted 06-30-2020 11:55
    Hi,

    I have seen this kind of problem when the column header includes new lines:

    For example: 
    "Column Header 1"

    "Column
    Header 2"

    The second option will fail when trying to use Get Worksheet as Collection Offset. Best solution is to rename the column header

    ------------------------------
    David Rubiano
    Senior Consultant
    Capgemini
    Europe/Stockholm
    ------------------------------