วิธีแปลง JSON เป็น CSV และเปิดใน Excel
- เลือก
- วาง
- บันทึก
You want to open JSON data received from an API or similar in Excel, to sort or total it. Convert CSV and JSON can convert JSON to CSV.
Steps (JSON → CSV)
- For "Direction", choose "JSON → CSV".
- Choose the "Delimiter (CSV)". For opening in Excel, "comma" is recommended.
- Paste the JSON into "Before conversion".
- Press "Convert".
- The CSV appears under "After conversion". Make it a file with "Save as file".
- Open the saved file in Excel.
The JSON shapes that can be converted
A form where data with the same items is lined up suits it.
Example: several records each with a "name" and "age".
In such a form, one record becomes one row and the item names become headings.
Tips for opening in Excel
- Double-clicking the saved file may garble the text.
- If garbled, import via Excel's "Data" menu, "From Text/CSV", where you can specify the encoding.
- Another way is to set the delimiter to tab and paste as is.
Using paste
Copying with "Copy result" and pasting into an Excel cell may put everything in one cell. In that case use Excel's "Text to Columns". If converted with tab as the delimiter, it pastes straight into columns.
เหมาะกับ
- Viewing API results as a table
- Totalling access logs and configuration data
- Viewing output from another system in Excel
ตัวอย่าง
Wanted to total JSON returned by a web service's API in Excel. Pasted the JSON and converted with "JSON → CSV". Opened the saved file in Excel and made a chart.
Common stumbling blocks
- Nested JSON goes into one cell: see the separate guide.
- Data with uneven items: some rows may lack columns.
- Numbers treated as text: set the format on the Excel side.
Frequently asked questions
Won't Japanese be garbled?
It depends on the settings of the side opening the file. If garbled, import specifying the encoding.
สรุป
Paste JSON, convert, save as a file and open in Excel. Handle garbling through the import settings.
ใช้ “แปลง CSV และ JSON” (ฟรี)เครื่องมือที่ใช้คู่กันได้ดี
- ลบบรรทัดซ้ำและเรียงลำดับรายการ: ลบบรรทัดซ้ำและเรียงลำดับ
- สร้างไฟล์ ZIP: รวมไฟล์หลายไฟล์เป็น ZIP เดียว
- นับตัวอักษร (สำหรับใบสมัครและรายงาน): นับตัวอักษร บรรทัด และแผ่นกระดาษต้นฉบับของข้อความ
หากคู่มือนี้เป็นประโยชน์ ทิปเล็ก ๆ น้อย ๆ จะเป็นกำลังใจอย่างมาก
ส่งทิป (¥300)ส่งของขวัญ (Amazon wishlist)