I am trying to upload a CSV as a Google spreadsheet
I do see that there is a request parameter convert=true available at
Can some one help me on how to set this flag in Java API?
The Drive.Files.Insert class has a setConvert method that you can use before calling execute. Using the file.insert sample as reference, you have to replace the following line:
File file = service.files().insert(body, mediaContent).execute();
with:
File file = service.files().insert(body, mediaContent).setConvert(true).execute();