lucky_sheet.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495
  1. package excel
  2. import (
  3. "encoding/json"
  4. "fmt"
  5. "hongze/hongze_chart_lib/utils"
  6. )
  7. type LuckySheetDataBak struct {
  8. CalcChain []interface{} `json:"calcChain" description:"公式链"`
  9. CellData []LuckySheetCellData `json:"celldata" description:"单元格数据"`
  10. ChWidth int64 `json:"ch_width" description:"工作表区域的宽度"`
  11. Config struct {
  12. BorderInfo []struct {
  13. BorderType string `json:"borderType" description:""`
  14. Color string `json:"color" description:""`
  15. Range []struct {
  16. Column []int64 `json:"column" description:""`
  17. Row []int64 `json:"row" description:""`
  18. } `json:"range" description:""`
  19. RangeType string `json:"rangeType" description:""`
  20. Style string `json:"style" description:""`
  21. Value struct {
  22. B struct {
  23. Color string `json:"color" description:""`
  24. Style string `json:"style" description:""`
  25. } `json:"b" description:""`
  26. ColIndex int64 `json:"col_index" description:""`
  27. L struct {
  28. Color string `json:"color" description:""`
  29. Style string `json:"style" description:""`
  30. } `json:"l" description:""`
  31. R struct {
  32. Color string `json:"color" description:""`
  33. Style string `json:"style" description:""`
  34. } `json:"r" description:""`
  35. RowIndex int64 `json:"row_index" description:""`
  36. T struct {
  37. Color string `json:"color" description:""`
  38. Style string `json:"style" description:""`
  39. } `json:"t" description:""`
  40. } `json:"value" description:"" description:""`
  41. } `json:"borderInfo" description:""`
  42. Colhidden struct{} `json:"colhidden" description:""`
  43. Columnlen map[string]float64 `json:"columnlen" description:""`
  44. CustomHeight struct {
  45. Zero int64 `json:"0"`
  46. } `json:"customHeight" description:""`
  47. CustomWidth struct {
  48. Two int64 `json:"2" description:""`
  49. } `json:"customWidth" description:""`
  50. Merge struct{} `json:"merge" description:""`
  51. Rowlen map[string]float64 `json:"rowlen" description:""`
  52. } `json:"config" description:""`
  53. Data [][]struct {
  54. Ct struct {
  55. Fa string `json:"fa"`
  56. T string `json:"t"`
  57. } `json:"ct"`
  58. M string `json:"m"`
  59. V interface{} `json:"v"`
  60. } `json:"data" description:""`
  61. DataVerification struct{} `json:"dataVerification" description:""`
  62. Filter interface{} `json:"filter" description:""`
  63. FilterSelect interface{} `json:"filter_select" description:""`
  64. Hyperlink struct{} `json:"hyperlink" description:""`
  65. Images struct{} `json:"images" description:""`
  66. Index string `json:"index" description:""`
  67. JfgirdSelectSave []interface{} `json:"jfgird_select_save" description:""`
  68. LuckysheetAlternateformatSave []interface{} `json:"luckysheet_alternateformat_save" description:""`
  69. LuckysheetConditionformatSave []interface{} `json:"luckysheet_conditionformat_save" description:""`
  70. LuckysheetSelectSave []struct {
  71. Column []int64 `json:"column" description:""`
  72. ColumnFocus int64 `json:"column_focus" description:""`
  73. Height int64 `json:"height" description:""`
  74. HeightMove int64 `json:"height_move" description:""`
  75. Left int64 `json:"left" description:""`
  76. LeftMove int64 `json:"left_move" description:""`
  77. Row []int64 `json:"row" description:""`
  78. RowFocus int64 `json:"row_focus" description:""`
  79. Top int64 `json:"top" description:""`
  80. TopMove int64 `json:"top_move" description:""`
  81. Width int64 `json:"width" description:""`
  82. WidthMove int64 `json:"width_move" description:""`
  83. } `json:"luckysheet_select_save" description:"" description:""`
  84. LuckysheetSelectionRange []struct {
  85. Column []int64 `json:"column" description:""`
  86. Row []int64 `json:"row" description:""`
  87. } `json:"luckysheet_selection_range" description:""`
  88. RhHeight int64 `json:"rh_height" description:""`
  89. ScrollLeft int64 `json:"scrollLeft" description:""`
  90. ScrollTop int64 `json:"scrollTop" description:""`
  91. Status int64 `json:"status" description:""`
  92. Visibledatacolumn []int64 `json:"visibledatacolumn" description:""`
  93. Visibledatarow []int64 `json:"visibledatarow" description:""`
  94. ZoomRatio int64 `json:"zoomRatio" description:""`
  95. }
  96. // LuckySheetData sheet表格数据
  97. type LuckySheetData struct {
  98. CellData []LuckySheetCellData `json:"celldata" description:"单元格数据"`
  99. ChWidth int64 `json:"ch_width" description:"工作表区域的宽度"`
  100. Config LuckySheetDataConfig `json:"config" description:""`
  101. //Index int `json:"index" description:"工作表索引"`
  102. RhHeight int64 `json:"rh_height" description:"工作表区域的高度"`
  103. ScrollLeft int64 `json:"scrollLeft" description:"左右滚动条位置"`
  104. ScrollTop int64 `json:"scrollTop" description:"上下滚动条位置"`
  105. Status int64 `json:"status" description:"激活状态"`
  106. VisibleDataColumn []int64 `json:"visibledatacolumn" description:"所有列的位置信息,递增的列位置数据,初始化无需设置"`
  107. VisibleDataRow []int64 `json:"visibledatarow" description:"所有行的位置信息,递增的行位置数据,初始化无需设置"`
  108. ZoomRatio int64 `json:"zoomRatio" description:"缩放比例"`
  109. }
  110. // LuckySheetDataConfig sheet表单的配置
  111. type LuckySheetDataConfig struct {
  112. BorderInfo []LuckySheetDataConfigBorderInfo `json:"borderInfo" description:"边框"`
  113. Colhidden map[string]int64 `json:"colhidden" description:"隐藏列,示例值:\"colhidden\":{\"30\":0,\"31\":0}"`
  114. Columnlen map[string]float64 `json:"columnlen" description:"每个单元格的列宽"`
  115. //CustomHeight struct {
  116. // Zero int64 `json:"0"`
  117. //} `json:"customHeight" description:""`
  118. //CustomWidth struct {
  119. // Two int64 `json:"2" description:""`
  120. //} `json:"customWidth" description:""`
  121. Merge map[string]LuckySheetDataConfigMerge `json:"merge" description:"合并单元格"`
  122. Rowlen map[string]float64 `json:"rowlen" description:"每个单元格的行高"`
  123. }
  124. // LuckySheetDataConfigMerge 合并单元格设置
  125. type LuckySheetDataConfigMerge struct {
  126. Row int `json:"r" description:"行数"`
  127. Column int `json:"c" description:"列数"`
  128. Rs int `json:"rs" description:"合并的行数"`
  129. Cs int `json:"cs" description:"合并的列数"`
  130. }
  131. // LuckySheetDataConfigBorderInfo 单元格边框信息
  132. type LuckySheetDataConfigBorderInfo struct {
  133. BorderType string `json:"borderType" description:"边框类型 border-left | border-right | border-top | border-bottom | border-all | border-outside | border-inside | border-horizontal | border-vertical | border-none"`
  134. Color string `json:"color" description:"边框颜色 color: 16进制颜色值"`
  135. Range []struct {
  136. Column []int64 `json:"column" description:"行"`
  137. Row []int64 `json:"row" description:"列"`
  138. } `json:"range" description:"选区范围 range: 行列信息数组"`
  139. RangeType string `json:"rangeType" description:"选区 rangeType: range | cell "`
  140. Style string `json:"style" description:"边框粗细 style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick ,和aspose.cells的getLineStyle()的值对应的话,需要自己做个转换,参考 aspose.cells"`
  141. Value LuckySheetDataConfigBorderInfoCellValue `json:"value" description:"" description:"范围类型分单个单元格的数据"`
  142. }
  143. // LuckySheetDataConfigBorderInfoCellValue 单元格边框信息(范围类型为:单个单元格)
  144. type LuckySheetDataConfigBorderInfoCellValue struct {
  145. B LuckySheetDataConfigBorderInfoCell `json:"b" description:"下边框"`
  146. L LuckySheetDataConfigBorderInfoCell `json:"l" description:"左边框"`
  147. R LuckySheetDataConfigBorderInfoCell `json:"r" description:"右边框"`
  148. T LuckySheetDataConfigBorderInfoCell `json:"t" description:"上边框"`
  149. ColIndex int64 `json:"col_index" description:"第几行"`
  150. RowIndex int64 `json:"row_index" description:"第几列"`
  151. }
  152. // LuckySheetDataConfigBorderInfoCell 单元格边框信息(cell类型)
  153. type LuckySheetDataConfigBorderInfoCell struct {
  154. Color string `json:"color" description:"边框颜色 color: 16进制颜色值"`
  155. Style string `json:"style" description:"边框粗细 style: 1 Thin | 2 Hair | 3 Dotted | 4 Dashed | 5 DashDot | 6 DashDotDot | 7 Double | 8 Medium | 9 MediumDashed | 10 MediumDashDot | 11 MediumDashDotDot | 12 SlantedDashDot | 13 Thick ,和aspose.cells的getLineStyle()的值对应的话,需要自己做个转换,参考 aspose.cells"`
  156. }
  157. // LuckySheetCellData 单个单元格数据
  158. type LuckySheetCellData struct {
  159. Col int64 `json:"c" description:"列"`
  160. Row int64 `json:"r" description:"行"`
  161. Value LuckySheetDataValue `json:"v" description:"单元格内值的数据"`
  162. }
  163. // LuckySheetDataValue 单元格内值的数据
  164. type LuckySheetDataValue struct {
  165. CellType LuckySheetDataCellType `json:"ct" description:"单元格值格式:文本、时间等 "`
  166. Value interface{} `json:"v" description:"原始值"`
  167. Monitor string `json:"m" description:"显示值"`
  168. Background string `json:"bg" description:"背景色,实例值:#fff000"`
  169. FontFamily int `json:"ff" description:"字体,0 Times New Roman、 1 Arial、2 Tahoma 、3 Verdana、4 微软雅黑、5 宋体(Song)、6 黑体(ST Heiti)、7 楷体(ST Kaiti)、 8 仿宋(ST FangSong)、9 新宋体(ST Song)、10 华文新魏、11 华文行楷、12 华文隶书 "`
  170. FontColor string `json:"fc" description:"字体颜色,示例值:#fff000" `
  171. Bold int `json:"bl" description:"粗体,0 常规 、 1加粗 "`
  172. Italic int `json:"it" description:"斜体,0 常规 、 1 斜体"`
  173. Fontsize string `json:"fs" description:"字体大小,14"`
  174. CancelLine int `json:"cl" description:"删除线, 0 常规 、 1 删除线"`
  175. HorizontalType string `json:"ht" description:"水平对齐, 0 居中、1 左、2右"`
  176. VerticalType string `json:"vt" description:"垂直对齐, 0 中间、1 上、2下"`
  177. TextRotate string `json:"tr" description:"竖排文字, 3"`
  178. RotateText string `json:"rt" description:"文字旋转角度, 介于0~180之间的整数,包含0和180"`
  179. TextBeak int `json:"tb" description:"文本换行, 0 截断、1溢出、2 自动换行"`
  180. Ps LuckySheetDataCellComment `json:"ps" description:"批注"`
  181. Function string `json:"f" description:"公式"`
  182. }
  183. // LuckySheetDataCellType 单元格值格式:文本、时间等
  184. type LuckySheetDataCellType struct {
  185. Fa string `json:"fa" description:"格式名称,例如:“General”为自动格式"`
  186. T string `json:"t" description:"格式类型,例如:“n”为数字类型"`
  187. S []struct {
  188. FontFamily string `json:"ff" description:"字体,0 Times New Roman、 1 Arial、2 Tahoma 、3 Verdana、4 微软雅黑、5 宋体(Song)、6 黑体(ST Heiti)、7 楷体(ST Kaiti)、 8 仿宋(ST FangSong)、9 新宋体(ST Song)、10 华文新魏、11 华文行楷、12 华文隶书 "`
  189. FontColor string `json:"fc" description:"字体颜色,示例值:#fff000" `
  190. Fontsize int `json:"fs" description:"字体大小,14"`
  191. CancelLine int `json:"cl" description:"删除线, 0 常规 、 1 删除线"`
  192. HorizontalType string `json:"ht" description:"水平对齐, 0 居中、1 左、2右"`
  193. VerticalType string `json:"vt" description:"垂直对齐, 0 中间、1 上、2下"`
  194. Un int `json:"un" description:""`
  195. Bold int `json:"bl" description:"粗体,0 常规 、 1加粗 "`
  196. Italic int `json:"it" description:"斜体,0 常规 、 1 斜体"`
  197. Value interface{} `json:"v" description:"原始值"`
  198. } `json:"s"`
  199. }
  200. // LuckySheetDataCellComment 批注
  201. type LuckySheetDataCellComment struct {
  202. Left int `json:"left" description:"批注框距离左边工作表边缘位置"`
  203. Top int `json:"top" description:"批注框距离上边工作表边缘位置"`
  204. Width int `json:"width" description:"批注框宽度"`
  205. Height int `json:"height" description:"批注框高度"`
  206. Value string `json:"value" description:"批注内容"`
  207. IsShow bool `json:"isshow" description:"是否显示批注"`
  208. }
  209. // GetLuckySheetData 获取LuckySheetData的结构体
  210. func GetLuckySheetData(jsonStr string) (item *LuckySheetData, err error) {
  211. err = json.Unmarshal([]byte(jsonStr), &item)
  212. return
  213. }
  214. // TableData 表格数据
  215. type TableData struct {
  216. TableDataList [][]LuckySheetDataValue
  217. RowWidthList []float64
  218. RowHeightList []float64
  219. RemoveTopRow int `description:"移除表格上方的行数"`
  220. RemoveBottomRow int `description:"移除表格下方的行数"`
  221. RemoveLeftColumn int `description:"移除表格左侧的列数"`
  222. RemoveRightColumn int `description:"移除表格右侧的列数"`
  223. MergeList []TableDataMerge `description:"合并数据列"`
  224. }
  225. // TableDataMerge 表格数据合并单元格配置
  226. type TableDataMerge struct {
  227. StartRowIndex int `json:"start_row_index" description:"开始的行下标"`
  228. StartColumnIndex int `json:"start_column" description:"开始的列下标"`
  229. MergeRowNum int `json:"merge_row_num" description:"合并的行数"`
  230. MergeColumnNum int `json:"merge_column_num" description:"合并的列数"`
  231. }
  232. // GetTableDataByLuckySheetDataStr 通过LuckySheet的string数据获取表格数据
  233. func (item *LuckySheetData) GetTableDataByLuckySheetDataStr() (selfTableData TableData, err error) {
  234. luckySheetCellDataList := item.CellData
  235. // 表格数据
  236. tableDataMap := make(map[int64]map[int64]LuckySheetDataValue)
  237. // 最大行,最大列
  238. var maxRow, maxCol int64
  239. for _, v := range luckySheetCellDataList {
  240. //fmt.Println("row:", v.Row, "=====col:", v.Col)
  241. if v.Row > maxRow { //最大行
  242. maxRow = v.Row
  243. }
  244. if v.Col > maxCol { //最大列
  245. maxCol = v.Col
  246. }
  247. var tmpRow map[int64]LuckySheetDataValue
  248. tmpRow, ok := tableDataMap[v.Row]
  249. if ok {
  250. tmpRow[v.Col] = v.Value
  251. } else {
  252. tmpRow = make(map[int64]LuckySheetDataValue)
  253. tmpRow[v.Col] = v.Value
  254. }
  255. tableDataMap[v.Row] = tmpRow
  256. }
  257. tableDataList := make([][]LuckySheetDataValue, 0)
  258. var i int64
  259. // 单元格宽度
  260. configColumnConf := item.Config.Columnlen
  261. rowWidthMap := make(map[int]float64)
  262. rowWidthList := make([]float64, 0) //
  263. // 单元格高度
  264. configRowConf := item.Config.Rowlen
  265. rowHeightList := make([]float64, 0) //
  266. for i = 0; i <= maxRow; i++ {
  267. //列
  268. tmpTableColDataList := make([]LuckySheetDataValue, 0)
  269. // 每个单元格的高度
  270. tmpHeight, ok := configRowConf[fmt.Sprint(i)]
  271. if !ok {
  272. tmpHeight = 0
  273. }
  274. rowHeightList = append(rowHeightList, tmpHeight)
  275. tmpRowData, ok := tableDataMap[i]
  276. if !ok {
  277. tableDataList = append(tableDataList, tmpTableColDataList)
  278. continue
  279. }
  280. var j int64
  281. for j = 0; j <= maxCol; j++ {
  282. tmpTableColData, ok := tmpRowData[j]
  283. if !ok {
  284. tmpTableColData = LuckySheetDataValue{}
  285. }
  286. //单元格显示的数据处理
  287. tmpTableColData.Monitor = handleCellVal(tmpTableColData)
  288. tmpTableColDataList = append(tmpTableColDataList, tmpTableColData)
  289. // 每个单元格的宽度
  290. tmpWidth, ok := configColumnConf[fmt.Sprint(j)]
  291. if !ok {
  292. tmpWidth = 0
  293. }
  294. rowIndex := len(tmpTableColDataList) - 1
  295. if _, ok2 := rowWidthMap[rowIndex]; !ok2 {
  296. rowWidthList = append(rowWidthList, tmpWidth)
  297. }
  298. rowWidthMap[rowIndex] = tmpWidth
  299. }
  300. tableDataList = append(tableDataList, tmpTableColDataList)
  301. }
  302. //总共多少行
  303. lenRow := len(tableDataList)
  304. //移除上下空行
  305. deleteRowIndexList := make([]int, 0)
  306. if lenRow > 0 {
  307. var flag = false
  308. // 移除上方空列
  309. for rowIndex := 0; rowIndex < lenRow; rowIndex++ {
  310. isDelete := true
  311. for _, v := range tableDataList[rowIndex] {
  312. if v.Monitor != `` {
  313. isDelete = false
  314. flag = true
  315. break
  316. }
  317. }
  318. if flag {
  319. break
  320. }
  321. if isDelete {
  322. selfTableData.RemoveTopRow++
  323. deleteRowIndexList = append(deleteRowIndexList, rowIndex)
  324. }
  325. }
  326. // 移除下方空行
  327. flag = false
  328. //尾部
  329. deleteBottomRowIndexList := make([]int, 0)
  330. for rowIndex := lenRow - 1; rowIndex >= 0; rowIndex-- {
  331. isDelete := true
  332. for _, v := range tableDataList[rowIndex] {
  333. if v.Monitor != `` {
  334. isDelete = false
  335. flag = true
  336. break
  337. }
  338. }
  339. if flag {
  340. break
  341. }
  342. if isDelete {
  343. deleteBottomRowIndexList = append(deleteBottomRowIndexList, rowIndex)
  344. selfTableData.RemoveBottomRow++
  345. }
  346. }
  347. if len(deleteBottomRowIndexList) > 0 {
  348. deleteRowIndexList = append(deleteRowIndexList, utils.RevSlice(deleteBottomRowIndexList)...)
  349. }
  350. lenDeleteRow := len(deleteRowIndexList)
  351. if lenDeleteRow > 0 {
  352. for rowIndex := lenDeleteRow - 1; rowIndex >= 0; rowIndex-- {
  353. //表格数据
  354. tableDataList = append(tableDataList[:deleteRowIndexList[rowIndex]], tableDataList[deleteRowIndexList[rowIndex]+1:]...) // 删除开头N个元素
  355. //表格高度
  356. rowHeightList = append(rowHeightList[:deleteRowIndexList[rowIndex]], rowHeightList[deleteRowIndexList[rowIndex]+1:]...) // 删除开头N个元素
  357. }
  358. }
  359. }
  360. //移除前后空列
  361. deleteColumnIndexList := make([]int, 0)
  362. if len(tableDataList) > 0 {
  363. var flag = false
  364. lenColumn := len(tableDataList[0])
  365. // 移除前方空列
  366. for columnIndex := 0; columnIndex < lenColumn; columnIndex++ {
  367. isDelete := true
  368. for _, v := range tableDataList {
  369. if v[columnIndex].Monitor != `` {
  370. isDelete = false
  371. flag = true
  372. break
  373. }
  374. }
  375. if flag {
  376. break
  377. }
  378. if isDelete {
  379. selfTableData.RemoveLeftColumn++
  380. deleteColumnIndexList = append(deleteColumnIndexList, columnIndex)
  381. }
  382. }
  383. // 移除后方空列
  384. flag = false
  385. //尾部
  386. deleteTailColumnIndexList := make([]int, 0)
  387. for columnIndex := lenColumn - 1; columnIndex >= 0; columnIndex-- {
  388. isDelete := true
  389. for _, v := range tableDataList {
  390. if v[columnIndex].Monitor != `` {
  391. isDelete = false
  392. flag = true
  393. break
  394. }
  395. }
  396. if flag {
  397. break
  398. }
  399. if isDelete {
  400. deleteTailColumnIndexList = append(deleteTailColumnIndexList, columnIndex)
  401. selfTableData.RemoveRightColumn++
  402. }
  403. }
  404. if len(deleteTailColumnIndexList) > 0 {
  405. deleteColumnIndexList = append(deleteColumnIndexList, utils.RevSlice(deleteTailColumnIndexList)...)
  406. }
  407. lenDeleteColumn := len(deleteColumnIndexList)
  408. if lenDeleteColumn > 0 {
  409. for columnIndex := lenDeleteColumn - 1; columnIndex >= 0; columnIndex-- {
  410. //表格数据
  411. for k, v := range tableDataList {
  412. tableDataList[k] = append(v[:deleteColumnIndexList[columnIndex]], v[deleteColumnIndexList[columnIndex]+1:]...) // 删除开头N个元素
  413. }
  414. //表格宽度
  415. rowWidthList = append(rowWidthList[:deleteColumnIndexList[columnIndex]], rowWidthList[deleteColumnIndexList[columnIndex]+1:]...) // 删除开头N个元素
  416. }
  417. }
  418. }
  419. //处理合并单元格
  420. tableDataMergeList := make([]TableDataMerge, 0)
  421. for _, v := range item.Config.Merge {
  422. indexRow := v.Row - selfTableData.RemoveTopRow
  423. indexColumn := v.Column - selfTableData.RemoveLeftColumn
  424. tableDataMerge := TableDataMerge{
  425. StartRowIndex: indexRow,
  426. StartColumnIndex: indexColumn,
  427. MergeRowNum: v.Rs - 1,
  428. MergeColumnNum: v.Cs - 1,
  429. }
  430. tableDataMergeList = append(tableDataMergeList, tableDataMerge)
  431. }
  432. // 表格数据
  433. selfTableData.TableDataList = tableDataList
  434. selfTableData.RowWidthList = rowWidthList
  435. selfTableData.RowHeightList = rowHeightList
  436. selfTableData.MergeList = tableDataMergeList
  437. return
  438. }
  439. // handleCellVal 处理单元格数据
  440. func handleCellVal(tmpTableColData LuckySheetDataValue) (valueStr string) {
  441. valueStr = tmpTableColData.Monitor
  442. if valueStr == `` {
  443. //valueStr = fmt.Sprint(cellInfo.Value)
  444. if valueStr == `` && tmpTableColData.CellType.S != nil {
  445. //不是设置在单元格上面,而是设置在文本上
  446. for _, cellS := range tmpTableColData.CellType.S {
  447. valueStr += fmt.Sprint(cellS.Value)
  448. }
  449. }
  450. }
  451. return
  452. }