Hello,
i’m using the latest version of Aspose and Open Office and my target framework is 3.0
I’m having problems with the ODT files.
When i create a new document:
string sModelPath = System.Web.HttpContext.Current.Server.MapPath(String.Concat("Models\letter.odt"));
Document oDoc = new Document(sModelPath);
And save it to my computer with:
SaveFormat oSave = SaveFormat.None;
switch (sExt)
{
case "docx":
oSave = SaveFormat.Docx;
break;
case "docm":
oSave = SaveFormat.Docm;
break;
case "doc":
oSave = SaveFormat.Doc;
break;
case "odt":
oSave = SaveFormat.Odt;
break;
case "pdf":
oSave = SaveFormat.Pdf;
break;
case "xps":
oSave = SaveFormat.Xps;
break;
case "rtf":
oSave = SaveFormat.Rtf;
break;
}
oDoc.Save(String.Concat(sModel, ".", sExt), oSave, SaveType.OpenInApplication, Response);
The letter.odt which i downloaded with my browser, is corrupt! Open Office tells me the document needs to be repaired. Letter.odt is a new empty document…