Skip to content

SetSheetPrOptions error #483

@Jeltopuz

Description

@Jeltopuz
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

Activity

xuri

xuri commented on Sep 18, 2019

@xuri
Member

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

Jeltopuz

Jeltopuz commented on Sep 20, 2019

@Jeltopuz
Author

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

added a commit that references this issue on Oct 23, 2020
c09d45f
added a commit that references this issue on Mar 14, 2024
eef232f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @xuri@Jeltopuz

        Issue actions

          SetSheetPrOptions error · Issue #483 · qax-os/excelize