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

Using InsertCols with formulas to the right breaks the workbook #1565

Closed
CSHornby opened this issue Jun 30, 2023 · 1 comment
Closed

Using InsertCols with formulas to the right breaks the workbook #1565

CSHornby opened this issue Jun 30, 2023 · 1 comment
Labels
bug Something isn't working
Projects

Comments

@CSHornby
Copy link

Description
Using InsertCols with formulas to the right of the insert breaks the workbook if the formulas reference a column to the left of the insert.

Steps to reproduce the issue:

  1. Create a workbook with a sheet that contains formulas in column C. The formulas were copied by dragging from the top. The formulas reference column A e.g. =A1 * 5.
  2. Insert a column between A and C, using InsertCols e.g. xl.InsertCols("Sheet1", "B", 1)`
  3. Save the workbook xl.SaveAs("test.xlsx")
  4. Open the workbook in Excel

Describe the results you received:
An error saying that the workbook has been repaired (or in other versions of Excel a dialog suggesting the workbook should be repaired) with the following extra information:

image

Describe the results you expected:
Workbook opens with no error reported

Output of go version:

go version go1.20.2 linux/amd64

Excelize version or commit ID:

v2.7.1

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

@CSHornby CSHornby changed the title Using InsertCols without formulas to the right breaks the workbook Using InsertCols with formulas to the right breaks the workbook Jun 30, 2023
@xuri xuri added the bug Something isn't working label Jul 3, 2023
@xuri xuri added this to Bugfix in v2.8.0 Jul 3, 2023
@xuri xuri added the in progress Working in progress label Jul 3, 2023
lidp20 added a commit to lidp20/excelize that referenced this issue Jul 3, 2023
@xuri xuri closed this as completed in e2c7416 Jul 3, 2023
@xuri
Copy link
Member

xuri commented Jul 3, 2023

Thanks for your issue. This issue has been fix by pull request #1567, please try to upgrade the master branch code, and this patch will be released in the next version.

@xuri xuri removed the in progress Working in progress label Jul 3, 2023
xuri pushed a commit to JDavidVR/excelize that referenced this issue Jul 11, 2023
jenbonzhang pushed a commit to jenbonzhang/excelize that referenced this issue Oct 22, 2023
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
v2.8.0
Bugfix
Development

No branches or pull requests

2 participants