0

Google ドキュメントを使用してブラウザで .docx、.doc、.ppt などのファイルを開きたいだけです。Google ドキュメントにドキュメントをアップロードするコードを作成し、ドキュメントのタイトル、作成者などを取得するコードも作成しました。 google doc にアップロードされたドキュメント....

アップロード ドキュメント (google docs) を開きたい...ブラウザで..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;

        }   

私に提案してください...前もって感謝します...

4

0 に答える 0