<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          go-xls基于 Golang 的 xls 讀取類庫(kù)

          聯(lián)合創(chuàng)作 · 2023-09-29 22:17

          Golang 編寫的 xls 讀取類庫(kù),能夠?qū)崿F(xiàn) xls 表格的讀取功能

          部分代碼:

          func (w *WorkBook) ReadAllCells() (res [][]string) {
              for _, sheet := range w.Sheets {
                  w.PrepareSheet(sheet)
                  if sheet.MaxRow != 0 {
                      temp := make([][]string, sheet.MaxRow+1)
                      for k, row := range sheet.Rows {
                          data := make([]string, 0)
                          if len(row.Cols) > 0 {
                              for _, col := range row.Cols {
                                  if uint16(len(data)) <= col.LastCol() {
                                      data = append(data, make([]string, col.LastCol()-uint16(len(data))+1)...)
                                  }
                                  str := col.String(w)
                                  for i := uint16(0); i < col.LastCol()-col.FirstCol()+1; i++ {
                                      data[col.FirstCol()+i] = str[i]
                                  }
                              }
                              temp[k] = data
                          }
                      }
                      res = append(res, temp...)
                  }
              }
              return
          }


          瀏覽 34
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  国产成人精品在线视频 | 欧美日本一二三区 | 亚洲欧洲日本在线 | 超碰午夜福利 | 香蕉黄色电影 |