Published on

Xuất dữ liệu Google Sheet và các biến

Authors
Table of Contents

Tạo link xuất vùng dữ liệu từ trang tính Google Sheet...

  • Xuất định dạng csv
https://docs.google.com/spreadsheets/d/1sBPMOHdZQlGzOipZcaA_wE5HlEAOdsjNP3bx0znVUBc/export?format=csv&gid=1303000203&range=A2:K200
  • Xuất định dạng pdf
https://docs.google.com/spreadsheets/d/1sBPMOHdZQlGzOipZcaA_wE5HlEAOdsjNP3bx0znVUBc/export?format=pdf&portrait=false&gridlines=true&size=8.2x5&scale=4&&fitw=true&horizontal_alignment=CENTER&vertical_alignment=MIDDLE&top_margin=0&bottom_margin=0&left_margin=0&right_margin=0&sheetnames=false&printtitle=false&pagenumbers=false&fzr=false&gid=912955833&range=A4:D21

Các format được hỗ trợ

pdf: Export the spreadsheet as a PDF file. csv: Export the spreadsheet as a CSV (comma separated values) file. xls: Export the spreadsheet as an Excel file in the XLS format. xlsx: Default Export the spreadsheet as an Excel file in the XLSX format. tsv: Export the spreadsheet as a TSV (tab separated values) file. ods: Export the spreadsheet as an ODS (open document spreadsheet) file. zip: Export the spreadsheet as a HTML file that is zipped.

Cú pháp:

export?format=[Định dạng được hỗ trợ]

Kích thước

letter: Default Sets the page size to 8.5" X 11" tabloid: Sets the page size to 11" X 17" legal: Sets the page size to 8.5" X 14" statement: Sets the page size to 5.5" X 8.5" executive: Sets the page size to 7.25" X 10.5" folio: Sets the page size to 8.5" X 13" a3: Sets the page size to 11.69" X 16.54" a4: Sets the page size to 8.27" X 11.69" a5: Sets the page size to 5.83" X 8.27" b4: Sets the page size to 9.84" X 13.9"

Một số biến

  • Xoay màn hình portrait giá trị true|false
&portrait=false
  • Kích thước

paper size: 0=letter, 1=tabloid, 2=Legal, 3=statement, 4=executive, 5=folio, 6=A3, 7=A4, 8=A5, 9=B4, 10=B5

&size=0
  • Hiển thị hàng kẻ ô cell
&gridlines=false
  • Scale kích thước

1: Default Normal scaling (100%) 2: Fit to width 3: Fit to height 4: Fit to page

Cú pháp:

&scale=4
  • Lặp lại hàng được cố định fzr giá trị true|false
&fzr=true
  • Căn cụm nội dung chiều ngang và dọc bằng vertical_alignment giá trị TOP|MIDDLE|BOTTOMhorizontal_alignment giá trị LEFT|CENTER|RIGHT
&horizontal_alignment=CENTER
&vertical_alignment=TOP