I have a data table and I wish to display the header from the data table into an excel. How can I do it?
Use writerange activies and click the properties add headers @Lau_Wei_Ting
I am using the append range instead of the write range activities as there is existing data and I do not want to overwrite it every time the execution runs.
is there any other way to display the header ?
Theres no properties AddHeaders for append range activities you can create a logic for it.
if you want how does your process goes ? @Lau_Wei_Ting
the above-attached file is my workflow. U can take a look on it
Currently, there is only able to display the value without the header.
I want the header to be displayed while not changing the append activity.
You can use two write cell activities and write the column header value in A1 and B1. After that use append range.
I do not understand, I would assume the range you are appending to already has headers, my best solution would be, use a write range and check where the last data ends then write the new range below that if that makes sense.
If I use both write cell activity follow by append range.
the result shows me is this
and I wish to get something like this.
the problem I face is when I use append range activity. It will not display the header together with the result after executed. In my case, I had created a data table with the header. then I give 2 assigned variables. Hence the result will only fetch variables from assign activity. So far, I am assumed that the header is stored in the data table and to display the header it needs methods to retrieve it.
there is a simple way without using any logic using LinQ and DT.Clone method
what i have done is cloned the Datatable whose column names we want and added a row containing its column name using LinQ(we got column names) and using Add data row activity added the columnnames in our main file and then appended the other files
Check this workflow for better understanding…Let me know about it
check column.xaml (8.4 KB)
Take the count of the rows in that sheet
Then use the write range with the range as A+ row.Count.Tostring
Thank you so much!!!
I am able to display the header!!!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.