Create excel Table with Dynamic datas - "@" character issue

Hello,

I am looking to create a Table on Excel with dynamic Rows and Columns.
However, I am facing a problem for which I can’t find a solution. It is certainly a minor problem but I need your help.
I have followed the example that has been proposed here: How to structure the excel data as Table and give it a Table Name?
Unfortunately, it generates this error.

image

“A@” is generated on this Activity : Convert.ToChar(Convert.ToUInt32("A"C)+Colcount-1)
image


Can you explain to me how this “@” was added here and how to remove it so that I can continue my Project?

Thanks a lot :slight_smile:

Hi,

If Colcount is 27, Convert.ToChar(Convert.ToUInt32("A"C)+Colcount-1) will return not "@" but "[".
Can you share your expressions after the above?

Or, I recommend to use UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter method.
This returns column letter from R1C1 style column index.
For example UiPath.Excel.Helpers.ExcelUtilities.ConvertColumnIndexToColumnLetter(27) returns "AA"

Regards,

1 Like

Hello Yoichi,

I used ConvertColumnIndexToColumnLetter method and works perfectly as only rows are dynamics.

Thanks a lot for your quick reply & help :slight_smile:

Regards,

1 Like

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