Skip to content

How can I fix the issue of cell borders disappearing from the custom table style? #2048

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DeveloperJo opened this issue Dec 19, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@DeveloperJo
Copy link

DeveloperJo commented Dec 19, 2024

I created a custom table style in an MS Excel sheet using the Excel program. The style includes cell borders for each cell.

image

However, after saving and closing the Excel file, when I reopen it and save it again using Excelize, the cell borders from my custom table style disappear.

image

Is there a way to resolve this issue?

@xuri
Copy link
Member

xuri commented Dec 19, 2024

Thanks for your issue. Which version of this library are you using? Could you show us a complete, standalone example program or reproducible demo? If you open an existing workbook, please provide the file attachment without confidential info.

@xuri xuri added the needs more info This issue can't reproduce, need more info label Dec 19, 2024
@DeveloperJo
Copy link
Author

DeveloperJo commented Dec 19, 2024

I am currently using version v2.9.0.
Here is the text.xlsx file used for testing, along with the code I wrote.

[
test.xlsx
](url)

package main

import (
	"flag"
	"fmt"

	"github.com/xuri/excelize/v2"
)

func main() {
   file_name := flag.String("file", "", "Input file Name")
   flag.Parse()

   fmt.Println(*file_name, *order_code)

   f, err := excelize.OpenFile(*file_name)
   if err != nil {
      fmt.Println(err)
      return
   }

   tables, err := f.GetTables("Sheet1")
   if err != nil {
      fmt.Println(err)
      return
   }

   fmt.Println(tables)

   if err := f.SaveAs("test1.xlsx",); err != nil {
      fmt.Println(err)
   }
}

@xuri xuri added bug Something isn't working in progress Working in progress and removed needs more info This issue can't reproduce, need more info labels Dec 19, 2024
@xuri xuri moved this to Bugfix in Excelize v2.9.1 Dec 19, 2024
@xuri xuri closed this as completed in 5ef4a36 Dec 20, 2024
@xuri
Copy link
Member

xuri commented Dec 20, 2024

Thanks for your feedback. I fixed this, please upgrade to the master branch code, and this patch will be released in the next verison.

@xuri xuri removed the in progress Working in progress label Dec 20, 2024
@DeveloperJo
Copy link
Author

Thank you for your prompt response. I have confirmed that everything is working properly. Thank you again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Status: Bugfix
Development

No branches or pull requests

2 participants