java - Drive Api Phone -


i'm trying create java program create , upload excel files google drive. after uploading need give permissions. have done thatbut problem lies in trying convert excel files google files in order people use sheets able update them phones. have not been able find on how on google api. appreciated.

assuming have path excel file:

java.io.file filecontent = new java.io.file(excelfilepath); filecontent mediacontent = new filecontent("application/vnd.ms-excel", filecontent);  // file's metadata. file body = new file(); body.settitle(filecontent.getname()); body.setmimetype("application/vnd.ms-excel");  // important part insert request = service.files().insert(body, mediacontent); request.setconvert(true); file file = request.execute(); // end of important part  if (file != null) {   showtoast("data uploaded: " + file.gettitle()); } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -