0

I have excel workbook with 10 sheets , I want to export range "B17:H28" from each sheet into one csv file not multiple csv files .I have code which exports each sheet with range into multiple csv files.

For Each sh In ActiveWorkbook.Sheets
Set rngtemp = Sheet.Range("B17:H28")
rngtemp.Copy
csvfilenametemp= ....
Set wbtemp = Application.Workbooks.Add(1)
With wbtemp
.Sheets(1).Range("A1").PasteSpecial xlPasteValues
.SaveAs Filename:=csvfilenametemp, FileFormat:=xlCSV, CreateBackup:=False
.Close
End With
kaustubh k
  • 11
  • 2

1 Answers1

0

You can combine multiple csv files into one file by

  1. opening command prompt
  2. Go to where your file is stored using cd "C/..."
  3. Type copy *.csv to output.csv
  4. Press run and check your directory
Nigel Savage
  • 991
  • 13
  • 26