Get Binance Fees into Spreadsheets (Google Sheets)

Viewed 327

I am trying to import a table from Binance fees (https://www.binance.com/en/fee/depositFee) to Google Sheets (buy i am trying into MS Excel).

When i get data, i dont know how split files for each network type.

Now, i have data like this:

=IMPORTHTML("https://www.binance.com/en/fee/depositFee"; "table"; 0)

Caputre of sheet data

Thanks!!!

3 Answers

One solution is, after importing data as you did, is to split each line as following

=iferror(transpose(flatten(arrayformula(transpose(split(transpose(C3:F3),char(10)))))),"")

You will get multiple blocks of 4 columns. And finally you can group data like this way, assuming there is a max of 4 blocks :

=query({query( 'raw data'!A3:V,"select A,B,G,H,I,J");query('raw data'!A3:V,"select A,B,K,L,M,N");query('raw data'!A3:V,"select A,B,O,P,Q,R");query('raw data'!A3:V,"select A,B,S,T,U,V")},"select * where Col3<>'' order by Col1")

https://docs.google.com/spreadsheets/d/1JCjJywK9qPprynX2byvAnU7jS4S9cAYmHAfLcuyW3oQ/edit?usp=sharing

I can offer a solution* with a formula in one cell that works over your importrange data (shown in cell H1 below):

enter image description here

=arrayformula(
{query(IFERROR(array_constrain(
{"Coin/Token","Full Name","Network","Minimum Withdrawal","Deposit fee","Withdrawal Fee";
flatten(split(rept("|"&A3:A,LEN(regexreplace($C3:$C,"[^\n]",""))+1),"|"))
,flatten(split(rept("|"&B3:B,LEN(regexreplace($C3:$C,"[^\n]",""))+1),"|"))
,flatten(split(C3:C,CHAR(10)))
,flatten(split(D3:D,CHAR(10)))
,flatten(split(E3:E,CHAR(10)))
,flatten(split(F3:F,CHAR(10)))
},
max(IF(A3:A<>"",LEN(regexreplace($C3:$C,"[^\n]",""))+1,))*COUNTA(A3:A),
6)
,),"where Col1 is not null",0)
})

It expands the cells in columns C,D,E and F where there are multiple items in C. It also repeats values from columns A and B.

Columns D and F correctly convert to numbers.

all you need is:

=INDEX(TRIM(TRANSPOSE(SPLIT(FLATTEN(QUERY({REPT(ARRAY_CONSTRAIN(
 IMPORTHTML("https://www.binance.com/en/fee/depositFee", "table", 1), 9^9, 2)&
 "×", 1+LEN(REGEXREPLACE(INDEX(""&
 IMPORTHTML("https://www.binance.com/en/fee/depositFee", "table", 1),, 3), 
 "[^\n]+", ))), REGEXREPLACE(QUERY(
 IMPORTHTML("https://www.binance.com/en/fee/depositFee", "table", 1)&
 "×", "select Col3,Col4,Col5,Col6", 1), "\n", "×")},,9^9)), "×"))))

enter image description here

Related