0

We are creating excel workbook using Interop. We are saving this excel workbook into shared folder. Excel worksheet has hyperlinks connected to few PDF files located into another shared folder. When we open excel file directly from the shared folder and click on the hyperlink, the link works fine and the PDF file opens. However, when we do save as of the excel into our local machine and then click on the hyperlink, the hyperlink gets appended with ..download\ and updates the URL in the hyperlink. Due to this, the links doesn't work. We are creating this excel file through c# code.

Is there a way to disable update links of the excel through c# code while creating the excel? Please help. Not sure if there a similar question already posted. If yes then please redirect to me. Please do let me know if you need any other details.

I tried below. But it is not working. This is the only step I have tried.

workSheet = workBook.Sheets[1];
workSheet.Activate();
workBook.UpdateLinks = Excel.XlUpdateLinks.xlUpdateLinksNever

Thanks in advance

  • please check this ; https://stackoverflow.com/questions/14908372/how-to-suppress-update-links-warning – anilcemsimsek May 23 '20 at 09:31
  • Thank you. But it doesnt help. We are actually creating the excel through C#. while creating is there a way to disable this option through code? – Naveen Kumar May 23 '20 at 10:23
  • Hi again @Naveen, i did some search for your problem. i guess it is not about the FILE so you can't do anything while creating file. Because it is about the EXCEL program so you have to change your program options. So may be we can try to find a way to change this options with VBA scripts or powershell if you still want ? – anilcemsimsek May 23 '20 at 15:56
  • Thank you @anilcemsimsek. But for now not needed. Will get back in case it is very much needed. – Naveen Kumar May 24 '20 at 08:14

0 Answers0