how to split a csv file into small chunks with headers using powershell
I am using the following code to split the large csv file into chunks. But the headers are not appending output files. Here is the powershell script: $InputFilename = Get-Content ‘C:\Users\Sridhar\Downloads\Leads.csv’ $destinationPath = ‘C:\Users\Sridhar\Downloads\’ $OutputfilenamePattern = ‘leads_’ $LineLimit = 500 $line = 0 $i = 0 $file = 0 $start = 0 $header = $InputFilename[0]… Read More how to split a csv file into small chunks with headers using powershell