简体   繁体   English

期望单元格区域而不是Java中的字符串(Aspose)

[英]Expecting Cell Area instead of string in Java(Aspose)

hyperlinks.add("A5", 1, 1, "C:\\book1.xls");

The following error i get in my eclipse. 我在日食中遇到以下错误。

The method add(CellArea, String, String, String) in the type Hyperlinks is not applicable for the arguments (String, int, int, String) 超链接类型中的方法add(CellArea,String,String,String)不适用于参数(String,int,int,String)

Can anyone help me to resolve my problem ?

I tried the latest version: Aspose.Cells for Java v17.3.8 with the following code and it worked fine. 我使用以下代码尝试了最新版本:Java v17.3.8的Aspose.Cells,它运行良好。

Please see the screenshot of the output excel file generated by this code. 请查看此代码生成的输出excel文件的屏幕截图。

在此处输入图片说明

Java Java的

Workbook wb = new Workbook();

Worksheet ws = wb.getWorksheets().get(0);
ws.getHyperlinks().add("A5", 1, 1, "c:\\book1.xlsx");

wb.save(dirPath + "output.xlsx");

Note: I am working as Developer Evangelist at Aspose 注意: 我在Aspose担任开发人员布道者

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM