How to use format cells activity

How do I use the Format Cells activity if I wishes to change the cells all to text format? Can’t seem to properly grasp the concept of IReadRangeRef to indicate the source. I do have this activity within the Use Excel File activity and have referenced the file as Excel.

The range I’m looking at is from column A to O but the rows is an uncertainty.

All advise and help much appreciated in advance.

Thank you.

@QTH,

If the rows are dynamic use Find First/Last Data Row activity to get last row.

The use this last row in your range like "A1:O"+intLastRow

Source property of Format Cells should be this

Excel.Sheet("Hoja1").Range("A1:O"+intLastRow)

Hey @QTH

You can also directly specify the range in the “Format Cell Activity” as shown below.

Excel.Sheet("Sheet1").Range("A:O")

It will dynamically format all the cells within the specified range.

Screenshot for your reference:

Best regards.
Ajay Mishra

For more context, I’m using a csv file, and sometimes the first column or any column for the sake of discussion, may have blank along the rows. This caused the last row count to be shorter than the actual number of rows regardless which column I chose. Is there any workabout for this?

This indeed work but the vast number of rows is actually taking quite abit of time for each file. And management had plans to increase the number of column to 30. Any advise?

@QTH,

Use filter activity to filter out black rows before format cells.

I need the rows to be intact as only one or more columns that may be blank for that row but there are still at least one value in one of the column for each row.