Skip to content
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

Scale a worksheet - automatic become 1 #1117

Closed
ipopa opened this issue Jan 10, 2022 · 2 comments
Closed

Scale a worksheet - automatic become 1 #1117

ipopa opened this issue Jan 10, 2022 · 2 comments
Labels
confirmed This issue can be reproduced

Comments

@ipopa
Copy link

ipopa commented Jan 10, 2022

Description

I have an excel with Scale Height - Automatic. When I'm using GetMergeCells or something else that it's using f.workSheetReader(sheet), it breaks, Automatic become 1.

Steps to reproduce the issue:

package main

import (
        "fmt"
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/xuri/excelize/v2"
)

func TestLocalFile(t *testing.T) {
	xlsx, err := excelize.OpenFile("./test.xlsx")

	assert.Nil(t, err)

	mergedCells, err := xlsx.GetMergeCells("Sheet1")

	assert.Nil(t, err)

	fmt.Println(mergedCells)

	filenameXLSX := "./test_output.xlsx"

	xlsx.SaveAs(filenameXLSX)
}

test

excel:
test.xlsx

Describe the results you received:
go test

test_output

excel:
test_output.xlsx

Describe the results you expected:
It must remain Automatic

Output of go version:

1.16

Excelize version or commit ID:

2245fccca0beb25a1bf309a1c9cbd273512f125a

Environment details (OS, Microsoft Excel™ version, physical, etc.):
OS: macOS Big Sur 11.5.2
Microsoft Excel™ version: Microsoft Excel for Mac 16.52

@xuri xuri added the confirmed This issue can be reproduced label Jan 11, 2022
@xuri xuri closed this as completed in b96329c Jan 11, 2022
@xuri
Copy link
Member

xuri commented Jan 11, 2022

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

@ipopa
Copy link
Author

ipopa commented Jan 11, 2022

thank you

jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
- Remove second useless parameter `isCurrentSheet` of the function `SetSqrefDropList`
- Fix missing page setup of worksheet after re-saving the spreadsheet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed This issue can be reproduced
Projects
No open projects
Status: Bugfix
Development

No branches or pull requests

2 participants