Integrations/C# / .NET
Language

Create spreadsheets & documents with C# / .NET

Create a shareable spreadsheet from C# using HttpClient — no EPPlus, ClosedXML, or Microsoft Graph. POST your rows as JSON and read the URL from the response. Works in .NET console apps, ASP.NET Core APIs, and Azure Functions.

C# (.NET HttpClient)
using System.Net.Http;
using System.Text;

using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer YOUR_API_KEY");

var json = """
{
  "title": "Q3 Revenue",
  "sheets": [{ "rows": [
    ["Month", "Revenue", "Growth"],
    ["July", 48200, "+12%"]
  ] }]
}
""";

var content = new StringContent(json, Encoding.UTF8, "application/json");
var res = await client.PostAsync(
    "https://openofficeai.com/api/v1/sheets", content);

Console.WriteLine(await res.Content.ReadAsStringAsync()); // has "url"

How to create a spreadsheet with C# / .NET

  1. 1Copy your API key from the dashboard.
  2. 2Set the Authorization header on an HttpClient.
  3. 3PostAsync the JSON body to /api/v1/sheets.
  4. 4Deserialize the response (System.Text.Json) and read the url.

Why use OpenOfficeAI with C# / .NET

Frequently asked questions

Do I need EPPlus or ClosedXML?

No. You send JSON; OpenOfficeAI builds the file. For an .xlsx download, call /api/v1/download/{id}?format=xlsx — no third-party spreadsheet library or commercial license needed.

How should I manage HttpClient in ASP.NET Core?

Use IHttpClientFactory (AddHttpClient) rather than newing up HttpClient per request, set the base address and auth header once, and inject the typed client where you create documents.

Can I generate a PDF in an Azure Function?

Yes. Create the document, then GET /api/v1/download/{id}?format=pdf and return the bytes as a FileResult or HttpResponseData with application/pdf.

Start creating documents with C# / .NET

Free tier includes 500 API calls per month — no card required.

Related integrations