MS Excel Vba/Macro equivalent in LibreCalc or OpenOfficeCalc
- by ReggieCL
is there an equivalent macro/vba in libre calc that does this routine;
- Read/open xls files in a path and do a batch import/copy of read sheets and merge it with the current open workbook.
Here's the vba I used in MS Excel. Thanks in advance
Sub Consolidate_Sheets()
'Folder Path to read the xlsx files from
Path = "F:\WIP2\Below 25\"
filename = Dir(Path & "*.xlsx")
Do While filename <> ""
Workbooks.Open filename:=Path & filename, ReadOnly:=True
For Each sheet In ActiveWorkbook.Sheets
'import/copy sheets from to read xlsx files
sheet.Copy After:=ThisWorkbook.Sheets(1)
Next sheet
Workbooks(filename).Close
filename = Dir()
Loop
End Sub