How to remove header from Output Data Table


#1

Hi

The objective is to filter a data table and copy the values in one of the columns to the clipboard. The only activity I could found to do something like this was Filter Data Table, which I output to another data table. That table I then write to a string using Output Data Table.

My problems is that the string contains the header - which I don’t want. I can’t remove the header from the table entirely. because I need it when I’m doing the filters.

I tried using the Remove Row activity, but it doesn’t have any impact on the header - I tried using 0 and 1. row index.

Any ideas?

ps. I would love to use the assign activity to do the filter on the data table, but had endless conversions issues and finally gave up.

Please let me know


#2

Try using write range activity to put the filtered data table into a new excel and then again use a read range and deselect the Add Headers property!
I know this is a bit lengthy method, but I hope this works for you.
If this doesn’t helps you please attach your workflow? :slight_smile:


#3

Hello,

You can achieve this by writing macro.
It really seems difficult using assign activities.

Cheers,
Pankaj


#4

Hi @MNeethling,

I think that if you can do the filtering through Filter Data Table activity, then it can be done using an Assign activity with the method Select of the DataTable class. If you specify how do you need to filter, then maybe someone can help you with it.
Also, using the Output Data Table activity, you can then manipulate the obtained string and remove the first line before copying it to the clipboard. This way is more troublesome I think.
Cheers


#5

@Manresa Yes, I have filtered using FIlter Data Table. I now have a Data Table with a single column that I want to copy to the clipboard. The problem is that it copies the header as well.

as I already stated in my original message it doesn’t work to remove a data row as the header isn’t seen as a row (I tried removing row 0 as well), I even updated my entire workflow not to read the headers into the data table, but when you filter and copy to the clipboard it still copies the generic header: Column 1.


#6

@MNeethling, if you want to use the Filter Data Table activity you can try what I did in this example. Check the second Assign, it may be a bit confusing, but it works.

Main.xaml (10.4 KB)

Let me know if it works!