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

write formula to Excel, formula treated as string #667

Open
1 of 4 tasks
EanLee opened this issue Aug 31, 2024 · 1 comment
Open
1 of 4 tasks

write formula to Excel, formula treated as string #667

EanLee opened this issue Aug 31, 2024 · 1 comment

Comments

@EanLee
Copy link

EanLee commented Aug 31, 2024

Excel Type

  • XLSX
  • XLSM
  • CSV
  • OTHER

Upload Excel File

image

MiniExcel Version

1.34.1

Description

When you directly output formulas to an Excel file using MiniExcel, and then save it as a new file, the cells containing the formulas are treated as regular data, and the formulas themselves do not work. The formulas only become active after you manually enter the cells, edit the formulas, and press Enter.

And, I can’t find the relevant settings and instructions in the instructions for use in the readme.

var data = new List<Dictionary<string, object>>
{
    new Dictionary<string, object>
    {
        ["Institution"] = "Institution",
        ["Created"] = "Created",
        ["Formula"] = "Formula",
    },
    new Dictionary<string, object>
    {
        ["Institution"] = "BMC Inc.",
        ["Created"] = "2021-01-01",
        ["Formula"] = $"=SUM(A2:B2)"
    },
};

MiniExcel.SaveAs("test.xlsx", data, printHeader: false, overwriteFile: true, excelType: ExcelType.XLSX);
@RaZer0k
Copy link
Contributor

RaZer0k commented Oct 15, 2024

Functionality waiting for Pull Request.
PR 679: Formula Support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants