My Observations with MessageBox - please share your inputs

I have just started UiPath Level 1 Lesson 9.
So I wanted to read from an excel file and display it to a message box.
Now I want to share my observations here:

  1. Two of the columns had same values so it throws DuplicateNameException. By excluding AddHeaders property this problem was solved.
  2. As my Excel file is big(it has 13925 rows and 54 columns) if I try to display the whole thing to MessageBox it is not coming. Is It a MessageBox limitation? I assume as it is used mostly for debugging purposes or just to show smaller strings so it is not suitable to display a big excel file in one shot.
    Please correct me if I am wrong.

Buddy @sujoy_mukherjee

  1. Yes of course buddy when we try to read the column details with read range. Activity and if the headers are not being checked, then if two columns in duplicate structure will give out that error, and if header is checked it will be taken as two different columns though with same data but of different headers…
  2. Yes buddy message box has certainsize limits, and we can get the data to get displayed by message box only of ceetain size and if it goes beyond certain size it will show siz limitation error, it is not only method to checknfor results and debugging, we have writeline, even that has size limits, or we have log message activity like that… @sujoy_mukherjee
1 Like

Thanks Buddy @Palaniyappan

It explains my doubt.

However I have one more question.

So I want to understand how it works internally…I mean I am using an Excel Application Scope. Within the Do Loop, I am mentioing the worksheet and the range using Read Range -that is ok.
Now the next step is within the Do loop, we are using OutputDataTable to store the full excel data as String(correct me if I am wrong) and then display it using MessageBox.

Now my question is why we are including the messagebox within Do Loop, should not it be outside the loop and display the String output?

1 Like

Buddy we usually do in this way to show the data n a excel with a message box

  1. Excel application scope
  2. Read range activity
  3. For each row loop with read range output variable of type datatable
  4. Here use a messagebox to see all the cell value like this

Cheers buddy

Thanks Buddy @Palaniyappan

You are always very supportive…a true Buddy :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.