I am creating an XLSX table using the OOXML SDK and I need to get rid of the x: namespace prefix. How can I achieve this?
using (SpreadsheetDocument doc = SpreadsheetDocument.Open ("template.xlsx", true))
{
// Save the shared string table part
if (doc.WorkbookPart.GetPartsOfType (). Count ()> 0)
{
SharedStringTablePart shareStringPart =
doc.WorkbookPart.GetPartsOfType (). First ();
shareStringPart.SharedStringTable.Save ();
}
// Save the workbook
doc.WorkbookPart.Workbook.Save ();
}
Here, the original XLSX file comes from Excel 2007 and does not have a prefix, however, after the save operation, the prefix appears. How can i avoid this?
namespaces spreadsheetml openxml openxml-sdk
user116884
source share