{"text_format":"1","workbook":"xlsx","n_sheets":4,"sheets":["Excel U","Exercise 1","Exercise 2","Exercise 3"],"not_rendered":{"charts":0,"images":0,"macros":1,"external_links":0,"defined_names":1,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"Excel U","index":0,"n_rows":13,"n_cols":2,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
["Additional Resources"]
["Excel University"]
[]
["Excel University"]
[null,"Learn Excel. Work Faster."]
[]
["Free Resources"]
[null,"We have tons of free resources for helping you learn Excel:"]
[null,"https://www.excel-university.com/learn-excel-free"]
[]
["Paid"]
[null,"We also offer formal training programs:"]
[null,"https://store.excel-university.com"]

{"sheet":"Exercise 1","index":1,"n_rows":58,"n_cols":3,"rows_kept":58,"cut":false,"hidden":false,"merged":[]}
["Exercise 1"]
["Excel University"]
[]
["Exercise","Goal:","Combine all Excel files in a specific folder and then bring each sheet into "]
[]
[null,"VBA Code:"]
[]
[null,null,"Sub CopyAllWorksheets_Browse()"]
[null,null,"    "]
[null,null,"    Dim ws As Worksheet"]
[null,null,"    Dim wbSource As Workbook, wbDest As Workbook"]
[null,null,"    Dim myPath As String"]
[null,null,"    Dim myFile As String"]
[null,null,"    Dim myExtension As String"]
[]
[null,null,"    ' Retrieve Target Folder Path From User"]
[null,null,"    With Application.FileDialog(msoFileDialogFolderPicker)"]
[null,null,"        .Title = \"Select a Folder\""]
[null,null,"        .AllowMultiSelect = False"]
[null,null,"        .Show"]
[null,null,"        myPath = .SelectedItems(1) & \"\\\""]
[null,null,"    End With"]
[]
[null,null,"    ' Target File Extension (must include wildcard \"*\")"]
[null,null,"    myExtension = \"*.xls*\""]
[]
[null,null,"    ' Create a new workbook"]
[null,null,"    Set wbDest = Workbooks.Add"]
[]
[null,null,"    ' Target Path with Ending Extention"]
[null,null,"    myFile = Dir(myPath & myExtension)"]
[]
[null,null,"    ' Loop through each Excel file in folder"]
[null,null,"    Do"]
[null,null,"        ' Set variable equal to opened workbook"]
[null,null,"        Set wbSource = Workbooks.Open(Filename:=myPath & myFile)"]
[]
[null,null,"        ' Loop through each worksheet in Workbook"]
[null,null,"        For Each ws In wbSource.Worksheets"]
[null,null,"            ws.Copy After:=wbDest.Sheets(wbDest.Sheets.Count)"]
[null,null,"        Next ws"]
[]
[null,null,"        ' Close the source workbook without saving"]
[null,null,"        wbSource.Close SaveChanges:=False"]
[]
[null,null,"        ' Get the next file name"]
[null,null,"        myFile = Dir"]
[null,null,"    Loop Until myFile = \"\""]
[]
[null,null,"    ' Remove the initial blank worksheet from the new workbook without warning"]
[null,null,"    Application.DisplayAlerts = False"]
[null,null,"    wbDest.Sheets(1).Delete"]
[null,null,"    Application.DisplayAlerts = True"]
[]
[]
[null,null,"    MsgBox \"Operation Complete\""]
[]
[null,null,"End Sub"]

{"sheet":"Exercise 2","index":2,"n_rows":4,"n_cols":2,"rows_kept":4,"cut":false,"hidden":false,"merged":[]}
["Exercise 2"]
["Excel University"]
[]
["Exercise","Add run button"]

{"sheet":"Exercise 3","index":3,"n_rows":8,"n_cols":2,"rows_kept":8,"cut":false,"hidden":false,"merged":[]}
["Exercise 3"]
["Excel University"]
[]
["Exercise","Store the file path in a cell rather than browse to the same folder every day"]
[null,"Use defined name: path"]
[null,"Be sure to include trailing \\ "]
[]
["Path","c:\\users\\jeff\\data\\"]