I emmbedded a pdf file in excel using aspose, but when i open the excel file and double click on the pdf icon it gets opened in excel and outside also. i dont want it to be opened in excel file
string ImageUrl = ConfigurationManager.AppSettings["PdfImageUrl"];//@"C:\Users\ramanam\Desktop\EmbedFile\New folder\pdficon.jpg";
//Get the picture into the streams.
FileStream fs = File.OpenRead(ImageUrl);
//Define a byte array.
byte[] imageData = new Byte[fs.Length];
//Obtain the picture into the array of bytes from streams.
fs.Read(imageData, 0, imageData.Length);
//Close the stream.
fs.Close();
//Get an pdf file path in a variable.
string path = ConfigurationManager.AppSettings["PdfUrl"];
//@"C:\Users\ramanam\Documents\Visual Studio 2010\Projects\PyramidFTP\PyramidFTP\Uploads\Report\6962\74ff6420-dff2-4d45-be83-fb74d01db44f.pdf";
//Get the file into the streams.
fs = File.OpenRead(path);
//Define an array of bytes.
byte[] objectData = new Byte[fs.Length];
//Store the file from streams.
fs.Read(objectData, 0, objectData.Length);
//Close the stream.
fs.Close();
sheetReport.OleObjects.Add(r + 1, dt2.Columns.Count, 40, 40, imageData);
//Set embedded ole object data.
sheetReport.OleObjects[r].ObjectData = objectData;
//FileFormatInfo info = FileFormatUtil.DetectFileFormat(MyDir + "Document.doc");
sheetReport.OleObjects[r].FileFormatType = FileFormatType.Pdf;