Auto formatting data into sendmany command

2

Apologies for the newb question. But what's the best way to convert data on spreadsheet (lists of addresses and corresponding amounts to be sent), into a format suitable to be entered as a sendmany command into bitcoin console with the minimum amount of steps? Ideally would handle any amount of addresses and amounts.
Thanks in advance if anyone can help out at all!

ie

from

1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ     0.01
1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz     0.5

to this

sendmany "" "{\"1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XZ\":0.01,\"1353tsE8YMTA4EuV7dgUXGjNFf9KpVvKHz\":0.5}"

Len

Posted 2015-06-01T19:25:24.633

Reputation: 21

Answers

1

You can export the spreadsheet as a CSV file, then parse it using your favorite programming language into a dictionary. Convert the dictionary to JSON, and that will give you the second argument to the sendmany command.

I'd do this in Python using the built-in csv and json packages.

I'm not aware of any solutions that will do this if you don't know how to program, though.

jdb6167

Posted 2015-06-01T19:25:24.633

Reputation: 162