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

SetSheetPrOptions error #483

Closed
Jeltopuz opened this issue Sep 17, 2019 · 2 comments
Closed

SetSheetPrOptions error #483

Jeltopuz opened this issue Sep 17, 2019 · 2 comments
Projects

Comments

@Jeltopuz
Copy link

f, err := excelize.OpenFile(filename)
	if err != nil {
		log.Fatal(err)
	}
if err := f.SetSheetPrOptions(sheet,
			excelize.OutlineSummaryBelow(false),
		); err != nil {
			panic(err)
		}

	err = f.SaveAs(filename)
	if err != nil {
		log.Fatal(err)
	}

If file is NewFile - it works
If file if OpenFile and file is empty - it works
If file is not empty - i get error:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"><logFileName>error122560_01.xml</logFileName><summary>Обнаружены ошибки в файле "C:\Users\a.kuimova\planningOfWorkDurations\app\filename.xlsx"</summary><removedParts><removedPart>Замененный компонент: часть /xl/worksheets/sheet1.xml с ошибкой XML. Ошибка загрузки. Строка 2, столбец 0.</removedPart></removedParts></recoveryLog>

Help me, please...(
I attached the file for example

file.xlsx

@xuri xuri added confirmed This issue can be reproduced in progress Working in progress labels Sep 17, 2019
@xuri xuri closed this as completed in eef232f Sep 17, 2019
@xuri
Copy link
Member

xuri commented Sep 18, 2019

Hi @Jeltopuz, thanks for your issue. I have fixed it. Please try to upgrade the library with the master branch code.

@xuri xuri removed confirmed This issue can be reproduced in progress Working in progress labels Sep 18, 2019
@Jeltopuz
Copy link
Author

@xuri , Thank you very match!)))))

@xuri xuri added this to Bugfix in v2.0.2 Sep 24, 2019
nullfy pushed a commit to nullfy/excelize that referenced this issue Oct 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
v2.0.2
  
Bugfix
Development

No branches or pull requests

2 participants