Closed jhohlfeld closed 1 hour ago
We can access Excel Worksheets via the Microsoft Graph API:
To test, call:
curl http://localhost:3000/graph/samples | jq "."
Make sure to configure this in your .env:
.env
GRAPH_TENANT_ID=<tenant-id> GRAPH_CLIENT_ID=<client-id> GRAPH_CLIENT_SECRET=<client-secret> GRAPH_ITEM_SHARE_URL=<document-share-link>
The result it a json like this:
[ [ "Datum", "Uhrzeit", "Lat", "Lng", "Alt", "Probennummer", "Stoffname", "Messwert" ], [ 45624, 0.5625, 8.2135422, 53.1446486, 7, 1, "Stickstoff", 0.3 ], [ 45624, 0.5625, 8.2135422, 53.1446486, 7, 2, "Phosphor", 0.07 ] ]
This process involves up to 4 http calls, which may entail wait times in the order of 6 seconds. That's why it may be beneficial to fetch the data and store it in memory/on disk.
⚠️ Updates might be possible to achieve using a webhooks API: https://learn.microsoft.com/en-us/graph/change-notifications-delivery-webhooks
-> will do in #22
We can access Excel Worksheets via the Microsoft Graph API:
To test, call:
Make sure to configure this in your
.env
:The result it a json like this:
Performance improvements
This process involves up to 4 http calls, which may entail wait times in the order of 6 seconds. That's why it may be beneficial to fetch the data and store it in memory/on disk.
-> will do in #22