Getting following error while opening an excel file which was saved using aspose.cells dll
Relationship tag requires attribute 'Target’
We are using Version (16.11.0.0) of Aspose.Cells.
Please provide the resolution at the earliest.
Hi,
Well, we cannot provide you fix for the issue unless we reproduce it on our end first.
Please try our latest version/fix: Aspose.Cells for .NET (Latest Version) if it makes any difference.
Aspose.Cells for .NET (Latest Version)
(please choose any of the above fixes for your underlying .NET Framework version)
If you still find the issue with this version, kindly create a simple console application, zip the project and post us here to generate such a file on our end, we will check it soon. Also, attach your template files if you are any.
Thank you.
Hi Amjad,
The fix did not work. After the file is saved using aspose.cells dll, we need to open the file using OpenXML (DocumentFormat.OpenXML dll) library as the saved file is needed by another team which consumes that file data.
Hi,
Hi,
We could drill down to the line of code which is leading to the issue. We need to add hyperlinks in one of the worksheet. The hyper links take user to other worksheets (in the file itself). If we don’t add the hyperlinks, things work fine.
We are using following method to add the hyperlink
//ws is the worksheet reference
ws.Hyperlinks.Add(CellsHelper.CellIndexToName(i + 1 + j, 1), 1, 1, String.Concat("#", “test”, “!A1”));
Please suggest if there is some other way to add the hyperlink. The above added link works fine when we open the file manually and click on them.
Quick help would be greatly appreciated.
Hi there,
var ws = book.Worksheets[0];
var index = ws.Hyperlinks.Add(“B1”, 1, 1, String.Concat(ws.Name, “!A1”));
ws.Hyperlinks[index].TextToDisplay = “#TestA1”;
book.Save(dataDir + “output.xlsx”);
using (SpreadsheetDocument spreadsheetDocument = SpreadsheetDocument.Open(dataDir + “output.xlsx”, false))
{
}
Thanks a million Guys. It worked !!!
Really appreciate your help and effort.
Thanks.