excelize icon indicating copy to clipboard operation
excelize copied to clipboard

DuplicateRow or InsertRows in table,and quick analysis tool will lost

Open DehaiWang opened this issue 6 months ago • 5 comments

Description

i insert some rows in the table zone , and quick analysis tool will lost

Steps to reproduce the issue:

package main

import (
	"github.com/xuri/excelize/v2"
	"log"
)

func main() {

	log.SetFlags(log.Lshortfile | log.LstdFlags)

	openFile, err := excelize.OpenFile("aa.xlsx")
	defer openFile.Close()

	if err != nil {
		log.Panicln(err)
		return
	}

	sheetList := openFile.GetSheetList()
	sheetName := sheetList[0]

	rowIndex := 4

	tableList, err := openFile.GetTables(sheetName)
	if err != nil {
		log.Panicln(err)
		return
	}

	tableItem := tableList[0]
	log.Printf("%+v\n", tableItem)

	err = openFile.DuplicateRow(sheetName, rowIndex)
	if err != nil {
		log.Panicln(err)
		return
	}
	
	//nowTime := time.Now().Format(time.DateTime)
	//openFile.SetCellValue(sheetName, "A5", nowTime)
	openFile.Save()

}

Describe the results you received: image and then ,quick analysis tool losted

Describe the results you expected: image

DehaiWang avatar Aug 28 '24 08:08 DehaiWang