Create blank excel sheet

Hi I want to create blank excel sheet.How I can create …?
right now I am using application scope in this case I need to pass datatable but I don’t have data table what I need to pass in daTA TAble.As mention in attachment

@Aditya10989

You can pass empty DataTable also. Just create one DataTable variable and pass it.

1 Like

thanks.I am getting error.object of instance like null value.I need to pass default value in data table…?

@Aditya10989

Pass below way under DataTable field in Write Range activity.

                        New DataTable()

image

2 Likes

then I think no need to create variable.and can you please explain me how to pass header in this excel

@Aditya10989

Yes in this case you no need to create new variable of type DataTable.

Do you mean want to create new excel sheet with headers ?

If yes then use Build DataTable activity and write headers and save it into one datatable variable. And then pass that datatable into Write Range activity.

1 Like

you mean to say build table use data table variable same data table variable I need to pass in write range instead of new data table() …?

image

Just do this!
Use Build Data Table activity and you can give columns
@Aditya10989

1 Like

@Aditya10989

Yes, Exactly.

If you want to create empty sheet then pass New DataTable()
Else use Build DataTable activity and write what fields you want to write it and then save into one DataTable variable and pass it to Write Range activity.

1 Like

not getting header error as mention in attachment

@Aditya10989

Did you saved the Build DataTable output into DtProcessReport variable or not ?

And also check Add Headers option in Write Range activity.

yes but I am using same build data table in another work flow I just copy and paste and remove output data table name used DtProcessReport and add header already checked

@Aditya10989 Do you want an Excel Sheet with Headers present or Just an Empty Excel Sheet?

@Aditya10989

If you want to write headers then use Write Cell activity and provide range and column names.

yes this I can do but I need to pass 15 header.Every time I used write cell activity it makes my code lengthy.what is the possible reason I am not getting header using build data table…?

I only want header

@Aditya10989 You can use Datatable.Clone as the Value Inside Write Range if you have a Datatable with the Headers you need, with Add Headers Checked.

Sequence.xaml (5.7 KB)

Go through this workflow!
@Aditya10989

I run your application also not get header

1 Like

Sequence.xaml (6.8 KB)

try now!
@Aditya10989