Write Text File: Value cannot be null. Parameter name: source

Hello @pauloengenharia5

Hope “dt” is your datatable variable?

You need to check whether the datatable is having some value and it has the header “SAP Code”.

Thanks