Hello,
there is the problem, that after saving an Excel document an embedded object is lost and will be presented as image only.
Precondition:
- open new excel
- insert - object - create from file - select a pdf file - ok
- save excel file as myFile.xlsx
Use following code to open and save the document.
After running the code open the document in Excel again and the embedded object cannot be opened anymore and will be presented as image only.
string strFileName = "myFile.xlsx"
XSSFWorkbook rWorkbook;
using (FileStream fs = new FileStream(strFileName, FileMode.Open, FileAccess.Read))
{
rWorkbook = new XSSFWorkbook(fs);
}
using (FileStream fs = new FileStream(strFileName, FileMode.Create, FileAccess.Write))
{
rWorkbook.Write(fs);
}
Thank you very much
Rob
Hello,
there is the problem, that after saving an Excel document an embedded object is lost and will be presented as image only.
Precondition:
Use following code to open and save the document.
After running the code open the document in Excel again and the embedded object cannot be opened anymore and will be presented as image only.
Thank you very much
Rob