I'm trying to export a range of cells to a csv file:
#Specify Range
$range = $sh_in.Range("E7:F13,B17:C25").Text
#Export range to csv
$range | Export-Csv "delivery-note\del_note_csv_test.csv" -NoTypeInformation
If I take off the .Text from the Range I get a huge amount of information, including the content of the cells, and I've tried replacing .Text with the header of the info I want, but this just gives an error. What can I do differently?