Not able to convert Excel file to Base64 which is generated using ClosedXML
See original GitHub issueRead and complete the full issue template
Do not randomly delete sections. They are here for a reason.
Do you want to request a feature or report a bug?
- Bug
Did you test against the latest CI build?
- Yes
If you answered No
, please test with the latest development build first.
Version of ClosedXML
0.95.3
What is the current behavior? We are creating an excel file using the ClosedXML. Then we are using that excel file to convert in the Base64. There is some issue in file Excel creation by ClosedXML. So that file is not properly converted into the Base64.
What is the expected behavior or new feature?
- We need to encode & decode Excel file into the Base64 which is generated by the ClosedXML.
Is this a regression from the previous version?
Regressions get higher priority. Test against the latest build of the previous minor version. For example, if you experience a problem on v0.95.3, check whether it the problem occurred in v0.94.2 too.
Reproducibility
This is an important section. Read it carefully. Failure to do so will cause a ‘RTFM’ comment.
Without a code sample, it is unlikely that your issue will get attention. Don’t be lazy. Do the effort and assist the developers to reproduce your problem. Code samples should be minimal complete and verifiable. Sample spreadsheets should be attached whenever applicable. Remove sensitive information.
Code to reproduce problem:
using (XLWorkbook wb = new XLWorkbook())
{
wb.Worksheets.Add(dt,"CategoryData");
//SAVE & UPLOAD FILE ON S3
using (MemoryStream stream = new MemoryStream())
{
wb.SaveAs(stream,true);
var IsSuccess = CommonFunction.tmpUploadBlogFileToS3(stream.ToArray(),Settings.TranslationExcelPath,FileName);
}
}
- I attached a sample spreadsheet. (You can drag files on to this issue) Category_Tranlsation_20200730044003805.xlsx Category_Tranlsation_20200730044003805.xlsx
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:13 (8 by maintainers)
Top GitHub Comments
Generate a good excel file that does work. Generate the bad one too. Save to disk instead.
Change file extension to .zip. Extract the files and do a diff on each file. Show the diffs.
Another thing you can do is open in excel and see if any warnings show. Save without doing anything in excel. Compare against the original bad file.
On Thu, Jul 30, 2020, 7:40 AM dharmingheewala notifications@github.com wrote:
That file is truncated, not the full binary. As I said, this is not a ClosedXML issue. Closing this issue. Please use StackOverflow for further support.