java - Change display name for hyperlink in csv file while opening through Excel -


i have java program has been used generate csv file. have column contains link web pages. want put link on custom display name on it.

when write =hyperlink("http://www.google.com","google") on msexcel gives me desired result. wanted same java program. program looks follows:

res.setcontenttype("application/csv");

bufferedwriter sbs = new bufferedwriter(res.getwriter());

res.setheader("content-disposition","attachment; filename=\"joblist.csv\"");

stringbuffer sb = new stringbuffer();

string link = "http://www.google.com";

string hyperlink = "=hyperlink(\""+link+jo.getid()+"\"\",\"\"google\")";

sb.append(hyperlink);

i followed link add hyperlink on csv file. can excel interpret urls in csv hyperlinks?

you can try this

"=hyperlink(""http://www.google.com"",""google"")","1234","yyyy" 

Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -