Problem in output of excel

flow

where my xcel output what i got is empty can any one help with this?

I do not see any where you are writing to excel.

You have to use Write Range Activity or Write Cell Activity to write into Excel.

The assign activities will update the data in your local data table but not directly into the Excel.

Regards,
Karthik Byggari

i have used build datatable and writerange also for output

@priyankavivek

If possible could you please share your workflow.

yes sure!
check.xaml (13.4 KB)OUTPUT

I need to get output like this

@priyankavivek

In IF condition, You specified like this: String.IsNullOrEmpty(rows(“GRN #”).ToString)

Where is this column ‘GRN #’ ? Is it in CSV file ? If yes then please share csv and this input excel file also.

iam sorry as it is confidential i cannot share those excel file,thankyou is any other ideas regarding this?what i have made mistake?please help me with it

1 Like

@priyankavivek

It seems everything is fine only. Could you please run the workflow in debug mode and check the error.

its running without errors:worried: but i dont why i dont get outputgrnstaryus
this is what iam getting

1 Like

Seems flow is not finding the GRN# …change the data within input file and share the template …otherwise it looks good.

Buddy i think the first row is because of build datatable activity which will be having a row attached in default…
image
…so thats why the first row comes out with empty row…and moreover i think the dt2 has no empty cell in that column.kindly check that buddy…use a clear datatable activity after you use build the datatable activity buddy and pass the input to clear datatable as op@priyankavivek

image

There is one logical issue ,

since you have used nested For each , Each time when you are gonna add,it is going to add the lastrow of the data table dt2 to the datarow. so your OP data table will have the same row repeated through out.

The only possible way to get an empty datatable is only if your dt2 is empty ( which means the csv which u r reading doesnt contain any data). can you please check if dt2 contains data and also can u plz make sure the csv which u r reading is Comma seperated(u have chosen comma as delimiter in the Read csv Property), if its not can u please change the delimiter option and try ?

Also u have added two empty rows in the build data table activity because of which you are getting a empty row at the start , can you delete those rows which are available in the build data table activity and try ?

You will have a default empty one row , more empty rows means more empty rows in the output.

1 Like

fine lets do one thing once after reading the csv you are getting the datatable right
lets check whether its creating a new datatable dt2 correctly or not
so once after reading the csv and converting to dt…use output datatable and write line activity to check whether the columnname and its values are aligned properly because i have doubt with this…columnname or indx @priyankavivek

1 Like

can i see the screenshot of that writeline actvity buddy…are the columnname aligned properly
@priyankavivek

trying with output table activity ! sure i will upload it

1 Like

output%20data

did i want to?do it like this?

yes buddy we need to see the output of read csv
so pass the output variable of read csv to output datatable
then get the output variable from output datatble and pass it to write line activity buddy

ooo

aaaha,here is the issue buddy
no worries, may i know what is the delimiter in your csv fle buddy
@priyankavivek

can you tell me elborately about delimiter ,i wasnot quite sureabout