วิกิฮาวเป็น "wiki" ซึ่งหมายความว่าบทความหลายๆ บทความของเรานั้นเป็นการร่วมมือกันเขียนของผู้เขียนหลายคน ในการเขียนบทความชิ้นนี้ นักเขียนที่อาสาสมัครมาได้ร่วมกันเขียนและปรับปรุงเนื้อหาของบทความอย่างต่อเนื่อง
บทความนี้ถูกเข้าชม 8,308 ครั้ง
ไฟล์ CSV หรือ “comma separated values” ใช้เซฟข้อมูลเป็นตาราง เหมาะสำหรับคนที่อยากบริหารจัดการฐานข้อมูลขนาดใหญ่ คุณสร้างไฟล์ CSV ได้ด้วย Microsoft Excel, OpenOffice Calc, Google Spreadsheets และ Notepad
ขั้นตอน
- เปิด spreadsheet ใหม่ใน Microsoft Excel, OpenOffice Calc หรือ Google Spreadsheets.
- ถ้าจะแปลง spreadsheet ที่มีเป็นฟอร์แมต CSV ให้ข้ามไปอ่านขั้นตอนที่ 4
- พิมพ์ชื่อแต่ละ header และ field ในเซลล์แถวที่ 1 ทางด้านบนของ spreadsheet. เช่น ถ้าจะป้อนข้อมูลสินค้า ให้พิมพ์ “Item Name” หรือชื่อสินค้า ในเซลล์ A1, “Item Price” หรือราคาสินค้า ในเซลล์ B1, “Item Description” หรือรายละเอียดสินค้า ในเซลล์ C1 แบบนี้ไปเรื่อยๆ[1]
- กรอกข้อมูลใน spreadsheet ของแต่ละคอลัมน์ตามต้องการ. โดยอ้างอิงตามตัวอย่างในขั้นตอนที่ 2 ให้พิมพ์ชื่อสินค้าในเซลล์ A2 ราคาสินค้าในเซลล์ B2 และรายละเอียดสินค้าในเซลล์ C2
- คลิก “File” แล้วเลือก “Save As” หลังกรอกข้อมูลทั้งหมดใน spreadsheet. ถ้าใช้ Google Spreadsheets ตัวเลือกนี้จะขึ้นว่า “File > Download as”[2]
- เลือก “CSV” ในเมนู “Save as type” ที่ขยายลงมา.
- พิมพ์ชื่อไฟล์ CSV แล้วเลือก “Save”. เท่านี้ก็สร้างไฟล์ CSV เรียบร้อย โดยจะใส่ลูกน้ำหรือ comma ที่ไฟล์อัตโนมัติ เพื่อแยกแต่ละ field[3]โฆษณา
- เปิด Notepad แล้วพิมพ์ชื่อ field คั่นด้วยลูกน้ำ ในบรรทัดแรก. เช่น ถ้าจะกรอกข้อมูลสินค้า ให้พิมพ์ในบรรทัดแรกว่า “name,price,description” หรือชื่อ,ราคา,รายละเอียด โดยไม่ต้องเว้นวรรค
- พิมพ์ข้อมูลในบรรทัดที่ 2 โดยใช้ฟอร์แมตเดียวกับชื่อ field ในบรรทัดแรก. ทำตามตัวอย่างในขั้นตอนที่ 1 โดยพิมพ์ชื่อสินค้าจริง ตามด้วยราคาและรายละเอียด เช่น ถ้าจะขายเสื้อยืด ก็ให้พิมพ์ว่า “เสื้อยืด,199,ลายหัวใจ”
- พิมพ์ข้อมูลของแต่ละสินค้าในบรรทัดใหม่ไปเรื่อยๆ. ถ้าปล่อย field ไหนว่างไว้ อย่าลืมใส่ลูกน้ำ ไม่งั้น field ที่เหลือจะกระโดดไป
- คลิก “File” แล้วเลือก “Save”.
- พิมพ์ชื่อไฟล์ แล้วเลือก “.csv” จากในเมนู file extension ที่ขยายลงมา.
- คลิก “Save”. เท่านี้ก็สร้างไฟล์ CSV ด้วย Notepad เรียบร้อย[4]โฆษณา
ข้อมูลอ้างอิง
บทความนี้เป็นประโยชน์กับคุณไหม
⚠️ Disclaimer:
Content from Wiki How ไท language website. Text is available under the Creative Commons Attribution-Share Alike License; additional terms may apply.
Wiki How does not encourage the violation of any laws, and cannot be responsible for any violations of such laws, should you link to this domain, or use, reproduce, or republish the information contained herein.
- - A few of these subjects are frequently censored by educational, governmental, corporate, parental and other filtering schemes.
- - Some articles may contain names, images, artworks or descriptions of events that some cultures restrict access to
- - Please note: Wiki How does not give you opinion about the law, or advice about medical. If you need specific advice (for example, medical, legal, financial or risk management), please seek a professional who is licensed or knowledgeable in that area.
- - Readers should not judge the importance of topics based on their coverage on Wiki How, nor think a topic is important just because it is the subject of a Wiki article.