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