1

我想知道我是否可以在不上传文档的情况下在 google docs 上创建一个文档。我只想从我的 c# windows 应用程序传递一个文本框的值并将其存储到 google docs 服务器上。我不想创建任何要在谷歌文档上上传的中间文件..我将文本框数据存储在 ms 访问数据库中,我希望它也保存在谷歌文档中..

4

1 回答 1

2

尝试使用以下代码:

DocumentsService service = new DocumentsService("MyApp");

// TODO: Authorize the service object

Stream stream = new MemoryStream(ASCIIEncoding.Default.GetBytes("This is the document content"));

DocumentEntry entry = service.Insert(new Uri(DocumentsListQuery.documentsBaseUri), stream, "text/plain", "Document title") as DocumentEntry;
于 2012-04-10T16:48:38.997 回答