Example: InsertHyperLink method

This example inserts a hyperlink in the cell (H8).

try {
  Application application = Application.getInstance();
  Spreadsheets spreadSheets = application.getSpreadsheets();
  Spreadsheet spreadSheet = spreadSheets.openSpreadsheet(
				"C:\\Scenario\\NewMethods.ods", true);
  Sheet sheet = spreadSheet.getActiveSheet();
  Range range = sheet.range("H8");
  range.insertHyperLink("This is a hyper link...", "http://www.sina.com.cn");
} catch(Exception e) {
  e.printStackTrace();
}

Related information

insertHyperLink method