Post
Topic
Board Development & Technical Discussion
Merits 2 from 2 users
Re: Wallet Label Export Format: A Proposal by Craig Raw
by
NotATether
on 01/09/2022, 07:42:48 UTC
⭐ Merited by NeuroticFish (1) ,ETFbitcoin (1)
Have you tried 'coding' the rather simple parsing logic in Excel? I'm not a very skilled Excel user, but just tried it and it works like a charm.
Code:
=IF(LEN(A2)<64; "address"; IF(LEN(A2)=64; "transaction"; IF(ISNUMBER(SEARCH("<";A2)); "input"; "output")))
No need to add an extra column for this, indeed!

I highly doubt the average Excel user with no programming language background whatsoever will be able to reproduce this query or understand what it does.
Then it can just be added into the BIP and that's it. It could even be exported with the data as a comment at the end of the file.
A third column would instead increase the file size by 50% as you'll add a 3rd field for each dataset.

I have actually sent an email related to this a few days ago, commenting that a 3rd column can be obsoleted by simply prefixing the different data formats with its own name. Such as: "address:" for addresses, "transaction:" for transactions, and so on.