Free Support Forum - aspose.com

Find location of cell which contrains embedded file aspose.cells

HI

I am using aspose.cells

How can i find the cell location of embedded file in excel

i have a embedded file employee1.pdf in cell[3,2] , how can i find the location in dot net using this dll


Bhupal


Hi,


I think you may make use of UpperLeftRow and UpperLeftColumn of the Shape class to know about Cell’s row/column indices. The OleObject class is extended from Shape class.

Thank you.

Hi Amjad ,

I tried what you suggested properties ,

But it is not giving the cell position
linkedcell property is there for OleObject but it is giving null value.
can u please tell me how to solve this problem, i am trying for this from one month i did not found any solution for this.
and possible please post code in .net for that properties

bhupal

Hi,

Please see this code, source file and the output. It prints F4 which is the starting cell of the embedded Ole object.

I have used the latest version:
Aspose.Cells for .NET (Latest Version)


C#


string filePath = @“F:\Shak-Data-RW\Downloads\source.xlsx”;


Workbook workbook = new Workbook(filePath);

Worksheet worksheet = workbook.Worksheets[0];


var obj = worksheet.Shapes[1];


int upperColumn = obj.UpperLeftColumn;

int upperRow = obj.UpperLeftRow;


string cellName = CellsHelper.CellIndexToName(upperRow, upperColumn);


System.Diagnostics.Debug.WriteLine(cellName);

Output:

F4

Hi
Ajmad Sorry for the previous post , Thanks i got the cell location but it is zero based index so i confused
and my problem how to identify the name of embedded file on that cell any property is there can u tell me.

Bhupal



Hi,

I think you mean Amjad :)

To get the source file information, you may use OleObject.SourceFullName attribute.

Thank you.

Many Thanks it is working fine and can u please tell me how to get name of the embedded file

i tried OleDb.SourceFullName but it is giving null values


Bhupal

Sorry for name mistake
I tried that OleDb.SourceFullName also but i did not get that name of the embedded file instead i got null values
, any alternate is there to find the name of the file.



Thanks
Bhupal

Hi,

Yes, it returns null, we will look into and fix it.

Tomorrow we are going to buy this dll, we developed all the thing basing on this demo dll then it will is not work means we can not buy, and all our effort will be useless,
Tomorrow is the dead line for me to fix this issue, please send me the fixed dll as soon as possible today then we can buy, other wise give alternatives for this issue

Thanks
Bhupal

Hi,


Thanks for considering Aspose.

We can fix the issue very soon (e.g in 1-2 days). We also want to have your template Excel file (containing the OleObject in it), it may help us to sort out the issue more accurately.

Thank you.

Hi,

I have escalated your issue to development team. But if am afraid, it is likely to take 2~3 days at least.

This issue has been logged as CELLSNET-30977.

Here is a screenshot for a reference.

Screenshot:

many many Thanks for quick response ,
please make sure that it will work and used to my application ,


bhupal


Hi,

OleObject.SourceFullName only effects when OleObject.IsLink is true.

In Ms-Excel, Insert object ->Create from file ->checked Link to file .

There is an issue to get OleObject.SourceFullName if the file is xlsx file.

We will look into it later.

Hi,

Please download the latest version: Aspose.Cells for .NET (Latest Version)

We have fixed an issue getting linked Embedded Ole Object source file name of xlsx file.

Hi Tried using this dll ,it is extracting the file name if it is has link to file option other wise as same as earlier, But i am checking with the excel which is already given by client so there did enable the link to file option, for this type of files how to get file name , can u tell,

Bhupal

Hi,

You cannot retrieve the link of embedded file. You can only retrieve it when OleObject.IsLink is true.