This question might be alittle big, but thats why im here.

using Excel = Microsoft.Office.Interop.Excel;
Above is the using statement in my C# class.


I am developing an application that requires interop with Excel. This application can grab data from Excel quite easy besides a few things.

As I was chugging along coding and all was going well, I saw this. . .

=HYPERLINK("C://Somthing//Somthing","FriendlyName")

Now when this is suplied I need to take that file and upload it to my database. Not to hard just get rid of the junk around the "C://Somthing//Somthing" then I got my filepath.

BUT!! I came across this...

=HYPERLINK("C://Somthing//&X5&//&E4&//Somthing","FriendlyName")

Now I have to extract the "C://Somthing//&X5&//&E4&//Somthing" break appart the string and create an array like this-

[0]- "C://Somthing//
[1]-&X5&
[2]-&E4&
[3]-//Somthing

and then grab the X5 and E4 cells from Excel and replace them and reassemble it back into a string.

BUT!! It gets better!

=HYPERLINK(VLOOKUP($BI6, Summary_4Ch6ChA2_Rev5!$A$1:$AA$3088,26,FALSE),VLOOKUP($BI6, Summary_4Ch6ChA2_Rev5!$A$1:$AA$3088,24,FALSE))

(I wont go into the above to much but basicaly I have to take the first VLOOKUP put it into a cell in Excel then take it back from Excel and it ends up being a link.)

--------------------------------------------------------------------------------------------------

What im getting at-

I want to know if there is a way to get back the Link_Location from Excel without doing anything but calling somthing from Excel Interop.

I really don't want to know where this could go if I can not resolve this in a cleaner way. There might be an infident Vlookups in Vlookups in Hyperlinks.