I am trying to pass the Google Spreadsheet ID (Where the file is in Google Drive with Every one view option) to the Google Drive Export API and download the file to local directory. As I need to download the file as xls or xlsx. If I use mimeType as "application/vnd.google-apps.spreadsheet" and getting an error as "The requested conversion is not supported". Same error message would be return to execute the same API using Google's API Explorer window as well. If I change the mimeType as "text/csv" then its working fine. Please help me whats the wrong with the mimeType which I used in the below code.
const drive = google.drive({version: 'v3', auth});
const res = drive.files.export({
fileId: '1YHO6KuXuUdTQmUgPTJkYNiLrkQBWejDREZLEK62ZT_Q',
mimeType: 'application/vnd.google-apps.spreadsheet',
responseType: 'stream' });
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
– pinoyyid