Solved Problem with GetWorksheet as Collection

Status
Not open for further replies.
Hello,
Im having an error when executing the function GetWorkSheet as Collection. The Excel file im processing have 2 worksheets, (w1 and w2). One worksheet works fine and is passed to a collection with no problem, for the second, the next error is shown:
error.png
The last part translated says : Cant find column 9.

If i delete column 9 in the file, it will say : Cant find column 8, and so on.

I tried changing the order in which i operate the worksheets, but didnt work either.

If someone have any information about this error, will help me a lot.

Thanks.
 

RDawson9

Geek
Staff member
Hi @arodriguezm

Could you please provide a screenshot of your action stage which uses "Get Worksheet as Collection" so I can see the inputs you're using?

I've just attempted this and it worked fine.

Rob :)
 
Hello Rob,
i did more tests with the Excel file and it seems to be the column 2 (column B) on the file, its kind of strange, if i delete only that column leaving all the other columns intact, the process just works fine and the collection is created. Im trying to check which row or what can be the the reason for this.
 
Ok, what i found, is that some rows in Column B (the column with the problem) are coming with a tabulation at the beginning. And some how this is causing the problem when BP tries to pass the worksheet to a collection. So if you encounter an error similar, this may be the problem. Working now on a solution
 

anisjolly

Administrator
Thanks for sharing your findings @arodriguezm

Sorry, got to this thread a little later than I wanted to but I was going to suggest the formatting of some of the rows. I've experienced this many times and normally is the main cause of such problems.
 
Status
Not open for further replies.
Top