export method
Exports spreadsheet in specified format
and writes it to file
worksheetId
- the worksheet id that will be exported, if not specified
the whole spreadsheet will be exported
Returns Future
Implementation
Future<File> export(
File file,
ExportFormat format, {
int? worksheetId,
}) async {
final bytes = await GSheets.export(
client: _client,
spreadsheetId: id,
spreadsheetUrl: url,
format: format,
worksheetId: worksheetId,
);
return file.writeAsBytes(bytes);
}