Git Product home page Git Product logo

csv-app-word-macro's Introduction

Messwerte nach Microsoft Word mit VBA übertragen

In Microsoft Word ist VBA (Visual Basic for Applications) eingebaut. Damit können Werte aus der SIWIAT App-Box mit folgenden Schritten übertragen werden.

Voraussetzung

Die OUT-App CSV muss auf der SIWIAT App-Box installiert sein.

Schritt 1: Start von VBA in Microsoft Word

Schritt 2: Schreiben Sie das VBA-Script, mit dem die Daten von der SIWIAT App-Box geholt und verarbeitet werden.

Als erklärendes Beispiel hierzu soll die Prozedur "GetChannels" dienen. Sie lädt die Metadaten aller in der SIWIAT App-Box gemessenen Kanäle und fügt sie an der Cursorposition im Dokument ein. Das Snippet kann per Copy&Paste direkt in den VBA Editor übertragen werden.

Sub GetChannels()
  Const URL$ = "http://<hostname>/ab/index.php/csv/1/api/getchannels"
  Dim txt As String, i As Long, ret As String
  With CreateObject("MSXML2.XMLHTTP")
    .Open "GET", URL, False
    .send
    txt = .responseText
  End With
  Selection.TypeText (txt)
End Sub

Ersetzen Sie mit der IP-Adresse Ihrer SIWIAT App-Box.

Schritt 3: Sie können diese Prozedur nun mit als Makro ausführen.

Um Messwerte zu erhalten, verwenden Sie folgende URL:

http://<hostname>/ab/index.php/csv/1/api/getvalues?valueids=73-100

Die entnehmen sie dem Befehl GetChannels. Mehrere können kommagetrennt hintereinander gehängt werden.

csv-app-word-macro's People

Contributors

ondics avatar

Watchers

 avatar

Forkers

siwiat

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.