1
GoogleのシートAPIを使用してシートを作成していて、シートのiframe埋め込み可能なリンクを取得したいと考えています。.net google sheet APIを使用してGoogleスプレッドシートで「publish to web」を設定するにはどうすればよいですか?
ServiceAccountCredential credential = new ServiceAccountCredential(
new ServiceAccountCredential.Initializer(serviceAccountEmail)
{
Scopes = new[] { SheetsService.Scope.Spreadsheets,DriveService.Scope.DriveFile}
}.FromCertificate(certificate));
BaseClientService.Initializer clientService = new BaseClientService.Initializer()
{
HttpClientInitializer = credential,
ApplicationName = ApplicationName,
};
var service = new SheetsService(clientService);
var spareSheet = new Spreadsheet();
spareSheet.Properties = new SpreadsheetProperties();
spareSheet.Properties.Title = "TestSheet";
spareSheet = service.Spreadsheets.Create(spareSheet).Execute();
まあ、あなたが[シートのAPI](https://developers.google.com/sheets/guides/concepts)でそれを行うことができないようです。また、そのドキュメンテーションを確認した場合、この「ウェブへの公開」に関するオプションや指示はありません。私が見つけた別の方法は、[ドライブAPIリビジョン](https://developers.google.com/drive/v3/reference/revisions)を使用することです。この[SOの質問](http://stackoverflow.com/questions/38533957/google-sheets-api-how-to-publish-to-web-for-embeddable-sheet)で確認できます。 – KENdi