Sorunuzu Sorun

larsbrandi isimli kullanıcının profili - etkinlik

2020-09-08 13:20:52 +0100 rozet alındı  Kendi öğrenen (kaynak)
2020-09-08 13:20:52 +0100 rozet alındı  Öğretmen (kaynak)
2017-04-29 11:55:26 +0100 rozet alındı  Öğrenci (kaynak)
2016-06-24 01:41:43 +0100 rozet alındı  Ünlü Soru (kaynak)
2016-05-19 06:08:39 +0100 rozet alındı  Önemli Soru (kaynak)
2016-05-11 09:07:51 +0100 rozet alındı  Popüler Soru (kaynak)
2016-04-28 11:36:04 +0100 bir soru cevapladı Import from REST API to Calc

Hi Ratslinger

Great, I will dive into it. Andrew Pitonyak's documents is now part of my desktop env ;-) . For the csv part i found this working ( simple simple ) Just get the csv file from internet and copy it to location. Credits to http://openoffice3.web.fc2.com/OOoBasic_General.html#OOoGB2A :

Sub oFileCopySFA
Dim oSimpleFileAccess
Dim oFromFile
Dim oToFile
    oSimpleFileAccess = createUnoService("com.sun.star.ucb.SimpleFileAccess")
        oFromFile = "https://api.vaultoro.com/latest"
        oToFile = "/tmp/test_copy.csv"
        If oSimpleFileAccess.Exists(oFromFile) then
            If NOT oSimpleFileAccess.Exists(oToFile) then   
                oSimpleFileAccess.copy(oFromFile, oToFile)
            else
                MsgBox(oToFile & " File exists, but was overwritten ", 0, "Caution !!")
                oSimpleFileAccess.copy(oFromFile, oToFile)
                Exit Sub
            End If
        else
            MsgBox( oFromFile & " Input file missing ", 0, "Caution !!")
            Exit Sub
        End If

End Sub

2016-04-27 16:49:58 +0100 bir soru sordu Import from REST API to Calc

Hi

I have an URL returning a JSON or a CSV file. I want to insert the received JSON data in a Calc sheet, or maybe more convenient save a CSV file to be read from Base. So I have two questions : 1. Is it possible to handle the URL returning the JSON in a macro, inserting it to a sheet ? 2. Is it possible to handle the URL returning a CSV file and save it from a macro

Best regards

larsbrandi