Bugzilla – Attachment 176863 Details for
Bug 146099
CALC Macro Basic - Link to external data not refreshed for doc loaded hidden
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
LinkToExternalData.bas
LinkToExternalData.bas (text/plain), 2.58 KB, created by
Hans-Werner
on 2021-12-11 11:40:21 UTC
(
hide
)
Description:
LinkToExternalData.bas
Filename:
MIME Type:
Creator:
Hans-Werner
Created:
2021-12-11 11:40:21 UTC
Size:
2.58 KB
patch
obsolete
> Sub LinkToExternalData > >' +---------+ >' [1] Create new "CSV.csv" containing |0,1,2,3,4|. >' +---------+ >' [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. >' [3] Start macro. >' [4] Results >' +---------+ >' ODS.ods: |0,1,2,3,4| ist to be seen. >' +---------+ >' MsgBox : Xmax=4 >' Ymax=0 >' Cell(4,0)=4 >' Cell(5,1)=0 >' +-----------+ >' [5] Modify "CSV.csv" to |0,1,2,3,4,5| >' |0,1,2,3,4,5| >' +-----------+ >' [6] Start macro again. >' [7] Results >' +-----------+ >' ODS.ods: |0,1,2,3,4,5| ist to be seen. >' |0,1,2,3,4,5| >' +-----------+ >' MsgBox : Xmax=5 >' Ymax=1 >' Cell(4,0)=4 >' Cell(5,1)=5 >' >' [8] 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 oCursor As Object > Dim oSheet As Object > Dim Xmax As Long > Dim Ymax As Long > > 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) > oCursor = oSheet.createCursor > oCursor.GotoEndOfUsedArea(False) > Xmax = oCursor.getRangeAddress().endColumn > Ymax = oCursor.getRangeAddress().endRow > > oODS.getCurrentController().getFrame().getContainerWindow().setVisible(False) > > oCell_x4y0 = oSheet.getCellByPosition(4,0) > oCell_x5y1 = oSheet.getCellByPosition(5,1) > > MsgBox("Xmax=" & Xmax & Chr(10) &_ > "Ymax=" & Ymax & Chr(10) &_ > "Cell(4,0)=" & oCell_x4y0.Value & Chr(10) &_ > "Cell(5,1)=" & oCell_x5y1.Value) > > oODS.Close(True) > > End Sub
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 146099
:
176767
|
176768
|
176786
|
176842
|
176863
|
176874
|
176875