Create spreadsheets & documents with Dart / Flutter
Create a shareable spreadsheet from Dart or Flutter using the http package. Send rows as JSON and get a URL back — handy for Flutter apps that need to export data and share a link. Route through your backend to keep the API key off the device.
Dart (http)
import 'package:http/http.dart' as http;
import 'dart:convert';
final res = await http.post(
Uri.parse('https://openofficeai.com/api/v1/sheets'),
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: jsonEncode({
'title': 'Q3 Revenue',
'sheets': [{ 'rows': [
['Month', 'Revenue', 'Growth'],
['July', 48200, '+12%'],
] }],
}),
);
print(jsonDecode(res.body)['url']);How to create a spreadsheet with Dart / Flutter
- 1Add the http package to pubspec.yaml.
- 2POST a jsonEncode body to /api/v1/sheets with the Bearer header.
- 3Decode res.body and read the url field.
- 4In Flutter, open the link with url_launcher or show it in a share sheet.
Why use OpenOfficeAI with Dart / Flutter
- One package, works on mobile, web, and desktop targets.
- Generate exports without a Dart spreadsheet library.
- Share the resulting link with the native share sheet.
Frequently asked questions
Is it safe to call this from a Flutter app?
Keep the API key out of the client. Proxy the call through your backend (Firebase Functions, a Dart Frog server, etc.) so the app never embeds the secret.
How do I open the spreadsheet link in Flutter?
Use the url_launcher package: launchUrl(Uri.parse(url)). Or pass the link to Share.share(url) so users can send it from your app.
Can I download the file in a Flutter app?
Yes. Request /api/v1/download/{id}?format=pdf, get the bytes, and save them with path_provider or hand them to a viewer plugin.
Start creating documents with Dart / Flutter
Free tier includes 500 API calls per month — no card required.