Delete extra row

Hi,

I am converting my text file into excel and I have included Headers.So when the file get converted into excel it writes data From Cell “A2” as A1 is for headers but it writes from Cell A3.
How can i make the data to be written from cell A2 onwards.Please help asap.
Note: A1 is for headers.

Regards

1 Like

Can you send a screenshot of your activity and its parameters?

It sounds like you are specifying a write range activity to write in cell “A2” but you need to change it to “A1” so that the data is in the right place. The headers are included as part of the ‘data’ as it is part of the datatable you are writing.

Below is the type of data i am getting in excel.
It is Writing from A3 but I want it from A2 as A1 is for Headers.
Here A2 is coming as an Empty row.
Please suggest on this.

A1* Fruits * Quantity
A2
A3 Orange 2
A4 Apple 3

Hi Somya,

Are you trying to convert the string type variable (read from the text file) to datatable first using the generate Data Table activity?

If you select the use header option in the generate Data Table activity, it will automatically treat the first column data in your text file as the header and when you write range it to the excel file, the first column data would not be included.

If you want all the data from the text file (including the first column data), I would suggest that you don’t select the use header option and write range from the A1 cell as what KEntwistle suggests.

Hope this helps.

A workaround could be to read range from A3 into datatable, don’t use headers, and write range to A2 without headers to kind of move it up one?

I have used Build dataTable activity and Post that foreach loop to access the items and then write range including headers where starting cell is “A1”

This is not giving the real result and I can’t use read range first as My Bot will create the excel after it reads all the data from textfile,converts it into datatable and then writes it into excelsheet where STARTINGcELL I have given “A1” but it is Writing headers in 1st Row i.e from cell a1,leaving second row blank and then datalist from row third i.e. cell A3 but I want it to not leave row 2 blank and write from cell A2.

@somya177 can you share the text file?

Hi @somya177
Please check your build data table activity, there you will have 2 data rows as mentioned in below scree

n shot. So remove one data row. Let me know if this solves.

Awesome…Thanks!!! :slightly_smiling_face:

1 Like