Skip to content

getExcelForWebWorkbookUrl appends .xlsx even when filename already ends with .xlsx #157

@daniel-hauser

Description

@daniel-hauser

In workbookManager.ts:106, getExcelForWebWorkbookUrl unconditionally appends .xlsx to the filename.

If the caller passes a filename that already ends with .xlsx (e.g., "report.xlsx"), the resulting filename becomes 1234567890_report.xlsx.xlsx.

Suggested fix: Check if the filename already ends with .xlsx before appending:

+const extension = filename?.endsWith(".xlsx") ? "" : ".xlsx";
-const fileNameGuid = new Date().getTime().toString() + (filename ? "_" + filename : "") + ".xlsx";
+const fileNameGuid = new Date().getTime().toString() + (filename ? "_" + filename : "") + extension;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions