# Export and Import Google Slides

Plan a PowerPoint-to-Google-Slides export, create a presentation from a PowerPointDocument, and import or replace Google Slides safely.

**Packages**

- [OfficeIMO.PowerPoint.GoogleSlides](https://www.nuget.org/packages/OfficeIMO.PowerPoint.GoogleSlides) `dotnet add package OfficeIMO.PowerPoint.GoogleSlides`
- [OfficeIMO.GoogleWorkspace](https://www.nuget.org/packages/OfficeIMO.GoogleWorkspace) `dotnet add package OfficeIMO.GoogleWorkspace`

**Works with**

- .NET

**Target frameworks**

netstandard2.0, net8.0, net10.0, net472

**APIs**

- [`PowerPointDocument`](/api/powerpoint/officeimo-powerpoint-powerpointdocument/)
- [`OfficeLength`](/api/core/officeimo-officelength/)
- [`GoogleServiceAccountCredentialSource`](/api/google-workspace/officeimo-googleworkspace-googleserviceaccountcredentialsource/)
- [`GoogleSlidesSaveOptions`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googleslidessaveoptions/)
- [`GoogleWorkspaceSession`](/api/google-workspace/officeimo-googleworkspace-googleworkspacesession/)
- [`GoogleDriveFileLocation`](/api/google-workspace/officeimo-googleworkspace-googledrivefilelocation/)
- [`GooglePresentationReference`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googlepresentationreference/)
- [`GoogleSlidesImportOptions`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googleslidesimportoptions/)
- [`GoogleSlidesImportResult`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googleslidesimportresult/)
- [`GoogleSlidesReplaceOptions`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googleslidesreplaceoptions/)
- [`GoogleSlidesTranslationPlan`](/api/power-point-google-slides/officeimo-powerpoint-googleslides-googleslidestranslationplan/)
- [`GoogleWorkspaceImportMode`](/api/google-workspace/officeimo-googleworkspace-googleworkspaceimportmode/)

**Limits**

Inserted images are fetched by Google from temporary public Drive files; if cleanup fails, the file stays public and the report says so. [OfficeIMO.PowerPoint.GoogleSlides support matrix](/compatibility/#package-powerpoint-googleslides)

**Verified**

Examples compiled against the source on 2026-11-14

**Data**

- [OfficeIMO.PowerPoint.GoogleSlides API index](/api/power-point-google-slides/index.json)
- [OfficeIMO.GoogleWorkspace API index](/api/google-workspace/index.json)
- [Capability catalog (JSON)](/data/capabilities.json)

`OfficeIMO.PowerPoint.GoogleSlides` translates a `PowerPointDocument` into Google Slides API requests. Text boxes, core run styles, external links, unmerged tables, uncropped PNG/JPEG/GIF pictures, common shapes, solid backgrounds, and speaker notes become editable Slides objects. Slides with merged tables, unsupported pictures or geometry, charts, SmartArt, media, OLE, or connectors are rendered to one PNG per slide by default; `PreferNativeAndReport` skips those elements instead and reports each loss.

## Create a presentation in Google Slides

Export does not change the remote page size; when sizes differ, it scales and centers the source coordinates.

### C#

```csharp
using OfficeIMO;
using OfficeIMO.GoogleWorkspace;
using OfficeIMO.PowerPoint;
using OfficeIMO.PowerPoint.GoogleSlides;

using var credentials = GoogleServiceAccountCredentialSource.FromFile("service-account.json");
var session = new GoogleWorkspaceSession(credentials, new GoogleWorkspaceSessionOptions { DefaultFolderId = "folder-id" });

using PowerPointDocument deck = PowerPointDocument.Create();
PowerPointSlide slide = deck.AddSlide();
slide.AddTextBox("Quarterly review",
    OfficeLength.Points(30), OfficeLength.Points(40), OfficeLength.Points(500), OfficeLength.Points(80));
slide.Notes.Text = "Discuss the year-over-year change.";

var options = new GoogleSlidesSaveOptions { Title = "Quarterly review" };

GoogleSlidesTranslationPlan plan = deck.BuildGoogleSlidesPlan(options);
foreach (TranslationNotice notice in plan.Report.Notices) {
    Console.WriteLine($"{notice.Severity} {notice.Code}: {notice.Message}");
}

GooglePresentationReference created = await deck.ExportToGoogleSlidesAsync(session, options);
Console.WriteLine(created.WebViewLink);
```

`TemplatePresentationId` copies an existing Drive presentation first and applies the slides to the copy.

## Import Google Slides and replace a presentation safely

Native import returns the Slides revision needed for a guarded replacement. `DriveExport` mode converts to PPTX for broader fidelity. Replacing an existing presentation requires `ExpectedRevisionId`; `OverwriteLatest` is an explicit last-writer-wins mode.

### C#

```csharp
using OfficeIMO.GoogleWorkspace;
using OfficeIMO.PowerPoint.GoogleSlides;

using var credentials = GoogleServiceAccountCredentialSource.FromFile("service-account.json");
var session = new GoogleWorkspaceSession(credentials);

GoogleSlidesImportResult current = await session.ImportGoogleSlidesAsync(
    "presentation-id",
    new GoogleSlidesImportOptions { Mode = GoogleWorkspaceImportMode.Native });

using (current.Document) {
    var replace = new GoogleSlidesSaveOptions {
        Location = new GoogleDriveFileLocation { ExistingFileId = current.Source.FileId },
        Replace = new GoogleSlidesReplaceOptions { ExpectedRevisionId = current.Source.RevisionId }
    };
    await current.Document.ExportToGoogleSlidesAsync(session, replace);
}
```

Google Slides fetches inserted images from URLs, so the exporter creates temporary publicly readable Drive files and tries to delete them on success and failure. A failed deletion is reported as `DRIVE.TEMPORARY_CONTENT.CLEANUP_FAILED` in the returned report and needs follow-up.

<!-- PowerForge markdown source sha256:3524745FDF3C19D60180DC90B85F8DD98E4F3A131A9794670318C876779ED1C6; title=True -->

<!-- PowerForge markdown artifact sha256:C2F68914A7819E32F98ACA5438E8E9FEDFFDDB60842EAE4484F6E84B6BA132BD -->
