Sub LinkToExternalData ' [1 ] Test 1 ' +---------+ ' [1.1] Create new "CSV.csv" containing |0,1,2,3,4|. ' +---------+ ' [1.2] Create new "ODS.ods". ' Link "ODS.ods" to "CSV.csv" using "[Sheet] [Link to external Data]". ' "Update eyery: ?? seconds" should not be checked, it's not neccessary for this testing. ' [1.3] Set: aP(0).Value = False (not hidden) ' [1.4] Start this macro ( [My Macros & Dialogs].Standard ). ' [1.5] MsgBox : Cell(4,0)=4 OKAY ' Cell(5,1)=0 OKAY ' ' [2 ] Test 2 ' +-----------+ ' [2.1] Modify "CSV.csv" to |0,1,2,3,4,5| ' |0,1,2,3,4,5| ' +-----------+ ' [2.2] Keep: aP(0).Value = False (not hidden) ' [2.3] Start macro again. ' [2.4] MsgBox : Cell(4,0)=4 OKAY ' Cell(5,1)=5 OKAY ' ' [3 ] Test 3 ' [3.1] Use same CSV.csv ([2.1). ' [3.2] Modify: aP(0).Value = True (hidden) ' [3.3] Start macro again. ' [3.4] MsgBox : Cell(4,0)=4 OKAY ' Cell(5,1)=0 ERROR ' ' [4 ] Problem / Feature Request ' If "Hidden" is set "True", the external link is not updated. ' Could it be possible to modify the CALC software the way, that the ' external link will be updated too when "Hidden" is set "True" ? Dim HOME As String : HOME = "E:/APP/LinkToExternalData/" ' MODIFY !!! Dim ODS As String : ODS = "ODS.ods" Dim oODS As Object Dim oCell_x4y0 As Object Dim oCell_x5y1 As Object Dim oSheet As Object Dim aP(0) As New com.sun.star.beans.PropertyValue aP(0).Name = "Hidden" aP(0).Value = False oODS = StarDesktop.loadComponentFromURL(ConvertToUrl(HOME & ODS),"_blank",0,aP()) wait (2000) oSheet = oODS.Sheets(0) oCell_x4y0 = oSheet.getCellByPosition(4,0) oCell_x5y1 = oSheet.getCellByPosition(5,1) MsgBox("Cell(4,0)=" & oCell_x4y0.Value & Chr(10) & "Cell(5,1)=" & oCell_x5y1.Value) oODS.Close(True) End Sub