Open xenlong opened 4 years ago
You need to have all blank cells below and to the right of the formula where the results will go. See here:
This is not an issue with IMPORTJSONAPI just the way that Google Sheets works.
I have a similar problem I know there is 50 rows per page but...
My workaround was to use QUERY
=QUERY(IMPORTJSONAPI("url/?date=2021-04-21&"&page=1", "$..*[*]","date, user.id, start_time, end_time, created_by_id, created_at","headers={ 'Authorization' : 'Bearer "&Token&" ' }"),"select * order by Col1 desc limit 50")
Are there an better solution?
Hi, This is my JSON data:
{ "order_code": "505976303", "coupon_code": null, "status": "complete", "total_price_before_discount": 589000, "total_price_after_discount": 589000, "created_at": "2020-07-10 16:43:47", "updated_at": "2020-07-22 17:08:57", "purchased_at": "2020-07-10 16:43:47", "fulfillment_type": "tiki_delivery", "note": "", "deliveryConfirmed": "", "delivery_confirmed_at": "2020-07-20 00:00:00", "is_rma": 0, "tax": { "code": null, "name": null, "address": null }, "discount": { "discount_amount": 0, "discount_coupon": 0, "discount_tiki_point": 0 }, "shipping": { "name": "Thu Vuong", "street": "tổ 10", "ward": "Thị Trấn Mường Chà", "city": "Huyện Mường Chà", "region": "Điện Biên", "country": "VN", "phone": "", "email": "", "estimate_description": "Dự kiến giao hàng vào Thứ bảy, 18/07/2020", "shipping_fee": 0 }, "items": [ { "id": 153010118, "product_id": 50722606, "product_name": "Máy hút bụi cầm tay mini Deerma DX118C công suất 600W dung tích bình chứa bụi 1.2L - Hàng chính hãng - Xanh", "sku": "4441306511894", "original_sku": "DX118C-B", "qty": 1, "price": 589000, "confirmation_status": null, "confirmed_at": "", "must_confirmed_before_at": "", "warehouse_code": null, "inventory_type": "instock", "serial_number": [], "imei": [], "discount": { "discount_amount": 0, "discount_coupon": 0, "discount_tiki_point": 0 }, "fees": [ { "fee_type_id": 1, "name": "Chiết khấu", "key": "percent_per_item_sales_value", "fee_total_amount": 58900 }, { "fee_type_id": 2, "name": "Phí thanh toán", "key": "payment_processing_fee", "fee_total_amount": 0 }, { "fee_type_id": 23, "name": "Phí cố định", "key": "base_fee", "fee_total_amount": 20000 } ], "fee_total": 78900, "seller_id": 42421 } ], "payment": { "payment_method": "cod", "updated_at": "2020-07-22 17:08:57", "description": "Thanh toán tiền mặt khi nhận hàng" }, "handling_fee": 0, "collectable_total_price": 589000 }
And this is my formula in Google Sheets:=importjsonapi("my-url","$..","status,purchased_at,delivery_confirmed_at,shipping.region,shipping.estimate_description,items[0].product_name,items[0].qty,items[0].price,items[0].fees[0].fee_total_amount,items[0].fees[1].fee_total_amount,items[0].fees[2].fee_total_amount,items[0].fee_total,payment.description","headers={'myapiname':'myapisecrectkey'}")
When I apply this formula to rows below, there is the error "Array result was not expanded because it would overwrite data..." in every row that formula was applied, excerpt last row. How can I fix it? How every rows will show correct data? Please help, thank you!