php
  • xml
  • google-spreadsheet
  • 2010-12-20 10 views 2 likes 
    2

    Google 스프레드 시트를 Google 워드 프로세서 api로 만들고 싶습니다. 문서를 변환 할 수 없습니다.라는 오류 메시지가 나타납니다.Google 스프레드 시트를 Google 문서로 생성

    $xml = "--END_OF_PART\r\n". 
         "Content-Type: application/atom+xml;\r\n\r\n".  
         "<?xml version='1.0' encoding='UTF-8'?> 
         <entry xmlns=\"http://www.w3.org/2005/Atom\" xmlns:docs=\"http://schemas.google.com/docs/2007\"> 
          <category scheme=\"http://schemas.google.com/g/2005#kind\" 
           term=\"http://schemas.google.com/docs/2007#spreadsheet\"/> 
          <title>".$name."</title> 
         </entry>\r\n". 
         "--END_OF_PART\r\n". 
         "Content-Type: text/csv;\r\n\r\n". 
         "--END_OF_PART--\r\n"; 
    

    이 XML 그럼 내가 오류가 발생했습니다 사실 PARAM 변환 =과 게시물과 구글의 서버로 전송 : 문서를 변환 할 수 없습니다. 'text/csv'대신 mime-type 'application/vnd.oasis.opendocument.spreadsheet'를 사용하고 param convert = true를 추가하지 않으면 내부 오류가 발생합니다.

    답변

    0

    문서 목록 API v3은 더 이상 사용되지 않습니다. 대신 Google 드라이브 API를 사용하십시오.

    https://developers.google.com/drive/v2/reference/files/insert

    네이티브 스프레드 시트에 대한 MIME 타입 다음과 같습니다 :

    응용 프로그램/vnd.google-apps.spreadsheet

    당신은 삽입 호출로 파일을 만들 수 있습니다
    관련 문제