Hello,

I am trying to get the following routine with the functions HTTP and
Spreadsheet to run under OOo 1.1.4. Neither the HTML- nor the
CSV-filter-options function.  When I look at the spreadsheet I see no link;
however, when I check the menue Edit-Sheet-Select the sheet names show the
LINK for the HTML-page. Although the following lines show the entire
routine,
only the last ten lines are really important:


=================================================================
REM ***** BASIC *****
Option Explicit
          Const STOCK_COLUMN = 2
          Const STOCK_ROW = 7

Sub Main
          GetHyperllinkT
End Sub
Sub GetHyperlinkT
         Dim Desktop As Object
         Dim sName As String
         Dim oDoc As Object
         Dim NoParm()
         Dim oSheets As Object
         Dim oSheet As Object
         Dim oRanges As Object
         Dim oCells As Object
         oDoc = ThisComponent
         oDoc.addActionLock
         oSheets = oDoc.Sheets(0)
         Desktop = CreateUnoService("com.sun.star.frame.Desktop")
         oSheets = oDoc.getSheets()
         If oDoc.Sheets.hasByName("Link") Then
                  oDoc.Sheets.removeByName("Link")
         End If
         sName = "AMD"
         Dim sUrl As String, sFilter As String
         Dim sOptions As String
         oSheets = oDoc.Sheets
         If oSheets.hasByName("Link") Then
                    oSheet = oSheets.getByName("Link")
              Else
                     oSheet =

oDoc.createInstance("com.sun.star.sheet.Spreadsheet")
                     oDoc.Sheets.insertByName("Link", oSheet)
                    oSheet.IsVisible = FALSE
         End If
         sUrl = "http://finance.yahoo.com/q?s="; + sName       rem + ".html"
         sFilter = "HTML (StarCalc)"
         sOptions = ""
         rem sFilter = "Text - txt - csv (StarCalc)"
         rem sOptions =
"44,34,SYSTEM,1,1/10/2/10/3/10/4/10/5/10/6/10/7/10/8/10/9/10"
         oSheet.link(sURL, "Link", "", "",
com.sun.star.sheet.SheetLinkMode.NONE)
         oDoc = Desktop.loadComponentFromURL(sUrl, "_blank", 0, NoParm())
         oSheet = oSheets.getByIndex(0)
         If oSheets.hasByName("Link") Then
               oSheet = oSheets.getByName("Link")
               MsgBox "sheet o.k."
            else
               MsgBox "no sheet"
               oSheet =
oDoc.createInstance("com.sun.star.sheet.Spreadsheet" )
               oDoc.Sheets.insertByName( "Link", osheet )
           End If
End Sub
============================================================================
==============

 I have no problem to store the HTML-page as a normal text-file under IE
6.0.

Maybe, I have the incorrect parameter settings for OOo 1.1.4, which prevent
the display of the web-page in the sheet.

Thanks.

Rudi







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to