when i am trying to get the columns count dt.Columns.Count.ToString its giving count 16384
but i have a data in 42 columns , i think it including empty columns as well.
Can any one help how to get actual columns count with data.
This looks strange
Fine may I know what is the range mentioned in the read range activity
Kindly restart both the excel and uipath studio application once and try again pls
This expression you have used should work for sure
Read range i am reading whole excel sheet “” passed
fine let’s validate like this
Go to excel keep the cursor in first cell A1 and press ctrl+A if only the columns with data gets selected then we are good
Or if the whole excel gets selected then we need to check with excel that it has occupied all columns in excel
This happens when there is border around empty cells. If you remove border around empty cells, the expression you mentioned works fine.
Thanks for the response
Actually excel doesn’t have any boarders
can you please share your excel file…
and remove the data and then fill some dummy data instead of original data…
Thanks for response.
when i am doing manually Ctrl+a it is selecting whole sheet but i need to seect columns which has data.
This expression is working fine for me if I have no borders around empty cells. The empty cells are being stored in DataTable as Column1, Column2 , and so on.
So you can create and use a flowchart similar to the following to count non-empty columns
Can you please send me the workflow if it is possible
Sure Naveen, please find the workflow attached.
test2.xaml (15.9 KB)
Yes now i am getting the count but when i am trying to add or removing the columns from data table its not updating the column count accordingly .
and one more thing when i am trying to print in msg box using output data table nothing is coming.
This is because the DataTable still contains empty columns. Try filtering DataTable by removing the columns that have ‘Column*’ in their headers/column name. And then doing other operations.
Thanks for your query, I suggest you to use ZetExcel tools for easy solutions. Just try it and get the result. Thanks
I have one more hack - Select all empty fields - right click - clear contents
and again right click and choose delete