java - how to open excel file in eclipse internal editor -


i need open excel file project explorer in eclipse internal editor. calling below function open file in editor.

public static void openfileintoeditor(string filepath) {     file filetoopen = new file(filepath);     if (filetoopen.exists() && filetoopen.isfile()) {         try {             ifilestore filestore = efs.getlocalfilesystem().getstore(filetoopen.touri());             iworkbenchpage page = guihandler.getpage();             try {                 ide.openinternaleditoronfilestore(page, filestore);                 //ide.openeditoronfilestore(page, filestore);             } catch (partinitexception e) {                 system.out.println("erorr in openfileintoeditor : " + e.getmessage());             }         } catch (exception e) {             system.out.println("erorr in openfileintoeditor2 : " + e.getmessage());         }     } else {     } } 

it works fine text file shows binary code when trying open excel file in internal editor. doing wrong or should need open excel file in internal eclipse editor java program.

there no internal editor excel files in standard eclipse. getting normal text editor trying edit binary file.

you try ide.openeditoronfilestore, may open 'in-place system editor` within eclipse (you need have 'allow in-place system editors' option set in preferences on 'general > editors' page).


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -