ajay raju

ajay raju

  • NA
  • 397
  • 0

Save OLEObject pdf file from excel

Jun 10 2022 12:21 PM

Hi,

I have an excel file and one cell of every row contain embed pdf file object and remaining cells contain string values. Excel file looks like

I want to save this excel file data in sql database table, I can read the cell data of Date, Store, Category, Cost, Total, Method columns using oledb provider or using Workbook and Worksheet classes and save it in database table fine.

but coming to the Receipt column it showing null value when reading from either oledb or worksheet,

1) I want to save embedded object in local folder row wise and get filepath 

2) Insert excel row data and for 'Receipt' column I need to save filepath

 

I will show this data in grid, for Receipt column I will set hyperlink and give filepath, so user can view the pdf that saved of that row.

How to implement using "Microsoft.Office.Interop.Excel" namespace and "OLEObject" class.

Any ideas please share it will helpful, I dont want to use third pary assembly references like GemBox, Aspose, etc.

 

Thanks,

Ajay

 


Answers (1)