Have you thought about doing this job using a macro? For example, using a macro recorder, record the sequence of actions “go to sheet - select A1:E1 - copy - go to cell A2 - paste special as links”, slightly modify this code and apply it to all sheets from the second sheet to the last sheet? I tried. It turned out that this is not very difficult:
Sub collectAllSheetsInFirst
Dim oSheets As Variant
Dim i As Long
oSheets = ThisComponent.getSheets()
For i = 1 To oSheets.getCount()-1
copyRngAsLink(i+1, i)
Next i
End Sub
Sub copyRngAsLink(sourceSheet As Integer, targetRow As Integer)
Const RANGE_TO_COPY = "$A$1:$E$1"
Dim document As Object
Dim dispatcher As Object
Dim args1(0) As new com.sun.star.beans.PropertyValue
Dim args2(5) As new com.sun.star.beans.PropertyValue
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
args1(0).Name = "Nr" : args1(0).Value = sourceSheet
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
args1(0).Name = "ToPoint" : args1(0).Value = RANGE_TO_COPY
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
args1(0).Name = "Nr" : args1(0).Value = 1
dispatcher.executeDispatch(document, ".uno:JumpToTable", "", 0, args1())
args1(0).Name = "ToPoint" : args1(0).Value = "$A$" & targetRow
dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
args2(0).Name = "Flags" : args2(0).Value = "SVDT"
args2(1).Name = "FormulaCommand" : args2(1).Value = 0
args2(2).Name = "SkipEmptyCells" : args2(2).Value = false
args2(3).Name = "Transpose" : args2(3).Value = false
args2(4).Name = "AsLink" : args2(4).Value = true
args2(5).Name = "MoveMode" : args2(5).Value = 4
dispatcher.executeDispatch(document, ".uno:InsertContents", "", 0, args2())
End Sub
What I like about this solution is that the macro is not at all interested in the names of the sheets, only their numbers, and therefore it does not matter whether it is Sheet1, Sheet2, Sheet3, or January, February, March, or John, Mark, Finch - the macro will do the job.