I use JExcelApi (JXL, version 2.6.12) to create an Excel file.
If a cell has an URL as value, then that cell is displayed in Excel* as plain text, but if the user double-clicks it (an thus enters edit mode), and then immediately clicks somewhere else (outside the cell), Excel will turn the cell into a clickable URL (blue and underlined, on click it is opened in the system browser, without questions like "Are you sure you want to open this link?").
How to avoid that? (I want the URL to stay as plain text, not clickable)
The cell is created like: new Label(3, 2, "http://www.example.org");
This happens even if I force text format, like this: new Label(3, 2, "http://www.example.org", new WritableCellFormat(NumberFormats.TEXT))
(this does help to prevent entries beginning with '=' to being interpreted, like =C3
)
When typing into Excel by hand, this can be done by typing an apostrophe as the first character. But in code if I do new Label(3, 2, "'http://www.example.org");
the apostrophe will be visible when the file is opened in Excel.
* I use Excel 2013 on Windows