qax-os / excelize

Go language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
https://xuri.me/excelize
BSD 3-Clause "New" or "Revised" License
18.17k stars 1.71k forks source link

Macros rendering as plain text #1461

Closed af-refined-networks closed 1 year ago

af-refined-networks commented 1 year ago

Description

After reading and writing from and to a xlsm file, the "macro" are being rendered as plain text:

Screenshot 2023-02-01 at 17 57 45

Steps to reproduce the issue:

  1. Open a file via excelize.OpenFile()
  2. Manipulate the opened workbook by either f.SetSheetRow() or f.DeleteSheet()

Describe the results you received:

Both f.SetSheetRow() or f.DeleteSheet() delivers what is expected but the "macros" are being rendered:

Screenshot 2023-02-01 at 17 57 45

Describe the results you expected:

A sheet with the rows 1-8 collpased

Screenshot 2023-02-01 at 18 02 35

Output of go version:

go version go1.19.5 linux/arm64

Excelize version or commit ID:

github.com/xuri/excelize/v2 v2.7.0

Environment details (OS, Microsoft Excel™ version, physical, etc.):

go running in a docker container using official go image alpine. Also tried using the "standard image" to no avail.

xuri commented 1 year ago

Thanks for your feedback. Could you provide a reproducible demo and your input file attachment without confidential info?

af-refined-networks commented 1 year ago

Of course, please find attached.

Archive.zip

xuri commented 1 year ago

Thanks for your issue. I have fixed it. Please try to upgrade to the master branch code, and this patch will be released in the next version.

af-refined-networks commented 1 year ago

Hi, I can confirm that the issue has been fixed. Thank you very much for your speedy response. Much appreciated.