Generate an id for imported data (Excel)
So I wrote this function in Excel VBA to generate a random string for the "id".
Usage: (in Excel column)
Function MakeApperyID(length As Integer) As String
' create a id string of "length" chars using 0-9 and a-f only
' in keeping with Appery DB _id format you could call this
' with length 4 to create a starting 4 char sequence in a fixed cell location
' and then add that to a length 20 call to create the remainder of the ID
Dim i, j, k
Result = ""
For i = 1 To length
k = CInt(Rnd()) 'zero or one to decide on letter or number
If k = 0 Then
j = CInt(Rnd() * 5)
ch = Chr(j + 97)
j = CInt(Rnd() * 9)
ch = Chr(j + 48)
Result = Result + ch
MakeApperyID = Result
Feel free to use, amend and feedback any useful changes.