-
Notifications
You must be signed in to change notification settings - Fork 806
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
Does save or save as not support saving shape? #1252
Comments
Please attach your input file. |
aaa.xlsx |
This bug appears in ClosedXML 0.95.1 as well. I have tested @93910676wangd code with slight correction: My conclusion: The red rectangle dissappeared. Below is @93910676wangd 's code without "using" namespace: class Program
{
static void Main(string[] args)
{
//Console.WriteLine("Hello World!");
try
{
//using (var workbook = XLWorkbook.OpenFromTemplate(@"D:\aaa.xlsx"))
using (var workbook = new ClosedXML.Excel.XLWorkbook(@"PATH_TO\aaa.xlsx"))
{
//var worksheet = workbook.Worksheets.Add("DA01");
var worksheet = workbook.Worksheet("111");
worksheet.Cell("A6").Value = "Test";
workbook.Save();
//workbook.SaveAs(@"D:\aaa_saveas.xlsx");
}
System.Console.WriteLine("finished");
}
catch (System.Exception ex)
{
System.Console.WriteLine(ex.Message);
}
System.Console.ReadKey();
}
} |
I have confirmed the behavior of the problem that the shape disappears when saving.
I found a workaround. |
Version of ClosedXML
0.94.2
Does save or save as not support saving shape?
There is a shape in my aaa. xlsx file and a text in the shape.
Open the file and save it (save or save as). There are no shapes in the saved file.
Open it with 7zip and find that drawings are not available under xl. Does the current version not support drawings yet?
Code to reproduce problem:
aaa.xlsx
The text was updated successfully, but these errors were encountered: