Excel to HTML - quan1997ap/angular-app-note GitHub Wiki

Bước 1: Tạo file Copy table từ word -> excel

Bước 2: Tăng fontsize -> 12px

Bước 3: Chỉnh border

  Bỏ các border không cần thiết. Vd phần dư, phần ngăn cách giữa các table

image

  Nên căn chỉnh để các table có chiều dài bằng nhau. Vd : Thêm 2 cột cho table trên

image

Bước 4: Auto fit row height

image

Bước 5: Đóng file. Dùng web https://convertio.co/vn/ convert excel to HTMl

Bước 6: Mở html -> Xóa

   .gridlines td { border:1px dotted black }
   .gridlines th { border:1px dotted black }

Bước 7: Mở html -> Xóa

        <col class="col0">
        <col class="col1">
        <col class="col2">

Bước 8: Thêm padding table vào file css

        td{
            padding: 8px 12px;
        }
        .table{
            width: 100%;
            max-width: 1300px;
        }

Chú ý

Khi in mà table k break qua trang mới

   style="page-break-after: always;"

Khi in mà table tràn quá page A4:

   td{
      padding: 8px 12px;  -> padding: 12px 4px;
   }

Thêm page print padding

   @page {
      padding-left: 20px;
      padding-right: 20px;
   }

Bước 9: Copy phần table

image