我只想使用谷歌文档在浏览器中打开我的 .docx、.doc、.ppt 等文件,我已经编写了在谷歌文档中上传文档的代码,我还编写了代码来获取我的文档的标题、作者等已在 google doc 上上传的文档....
我想在浏览器中打开上传文档(谷歌文档)......使用.net代码......
这是我上传文件的代码
protected void Button2_Click(object sender, System.EventArgs e)
{
DocumentsService myService = new DocumentsService("exampleCo-exampleApp-1");
myService.setUserCredentials("email@gmail.com", "password");
DocumentEntry newEntry = myService.UploadDocument(@"d:\abc.docx", "abc.docx");
}
这是我获取标题和其他信息的代码...
DocumentsService myService = new DocumentsService("exampleCo-exampleApp-1");
myService.setUserCredentials("email@gmail.com", "password");
DocumentsListQuery query = new DocumentsListQuery();
DocumentsFeed feed = myService.Query(query);
Console.WriteLine("Your docs: ");
foreach (DocumentEntry entry in feed.Entries)
{
Label1.Text = entry.Title.Text;
}
请建议我...提前谢谢...