Hi!
What we want to do is edit and save the .xltx file itself without creating a new file or adding a row, and the Name of the workbook template to be displayed (See below screen shot -> SignPlot as seen in the File Explorer and not “Untitled 1” as currently displays)
When open with M. Excel displays SignPlot1 which is ok, but when open with LibreOffice or OpenOffice is displaying Untitled 1.
The sample code and steps to replicate the scenario:
- Create an .xltx template and just write anything to it (not to leave it empty). Save it with TestName for eg.
- Create a ConsoleApp in .net (c#) and write (after you referenced Aspose.Cells of course) on Main:
string file = @“the book template path and name here…”;
Workbook wbTemplate = new Workbook(templFile);
wbTemplate.Save(templFile, SaveFormat.Xltx);
Process.Start(templFile);
What we’ve tried:
(we thought this is caused because Libre thinks if you open a template xltx file, it must be because you want to create a new worksheet based upon it)
Changing worksheet name: (changes sheet name but didn’t solve the name display)
wbTemplate.Worksheets[0].Name = "SP77";
Changing workbook fileName: (didn’t have any effect)
wbTemplate.FileName = "SignPlot77";
Populating a random cell with an empty string value (thought that will trigger the changing of wb name):
wbTemplate.Worksheets[0].Cells[15,15].PutValue("");
None of the above worked. I wonder if workbookDesigner class might help, or another workbook property that we’re not aware of, or any other suggestion is welcomed. Thanks in advance.BookTemplateDisplayName.PNG (17.6 KB)