dotnetcore / dotnetcore/Magicodes.IE
使用Office打开。导出的文件(magicodes.IE.Excel)报错提示需要修复。但是使用wps导出则不会产生此问题。
- Dominant language
- C#
- Stars
- 2.2k
- Forks
- 495
- PR merge metrics
- No merged PRs in 30d
Description
### Expected behaviour
环境(W11,W10,.NET 6.0, Magicodes.ie 2.6.4)
[HttpPost("download")]
public async Task DownLoad() {
//ExcelPackage.LicenseContext = LicenseContext.NonCommercial;
var path = Path.Combine(Directory.GetCurrentDirectory(), "excel");
var filepath = Path.Combine(path, "工作簿1.xlsx");
FileStream fileStream = new FileStream(filepath, FileMode.Open, FileAccess.ReadWrite);
using (ExcelPackage pa=new ExcelPackage(fileStream)) {
//var sheets= pa.Workbook.Worksheets[0];
// sheets.Cells[5, 5].Value = "100543 ds ";
pa.Save();
return File(pa.GetAsByteArray(), "application/octet-stream", "aaaa.xlsx");
}
}
### Actual behaviour
Tell us what happens instead. Provide a log message if relevant.
### I'm seeing this behaviour on
_Remove this hint: these checkboxes can be checked like this: [x]_
- [ ] Magicodes.IE.Excel
#### package versions
Example: Magicodes.IE.Excel 2.6.4
### So how can we reproduce this?
_Remove this hint: Pick one of these - use the Preview feature of this editor to get a sense which option we like best_
#### Awesome :star::star::star::star::star:
Provide a (link to a) minimal demo app showing the faulty behaviour.
#### Sweet :star::star::star::star:
Provide a concise code sample which can upload attachments.
#### Good :star::star::star:
Provide your own app and instructions how to reproduce the issue.
#### Meh :star::star:
Provide a code sample with a bunch of magic parameters which I need to interpolate by guessing to reconstruct the actual runtime code.
#### Worst :poop:
Say the source code can't be disclosed and refuse to provide any of the above. Expect this issue to be closed by a bunch of angry aliens :alien::alien::alien::alien::alien: that will hunt you down and :fire: your :computer:. You've been warned. :fire_engine:
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.