views:

7

answers:

0

everythings works fine with uploading a word document. It's converts correctly to a google document, but when i upload a .xls a throws the error: could not convert document.

This is the code i use:

$type = "application/vnd.ms-excel";
        $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\"&gt;
              <category scheme=\"http://schemas.google.com/g/2005#kind\"
                  term=\"http://schemas.google.com/docs/2007#spreadsheet\"/&gt;
                 <title>".$name."</title>
                <docs:writersCanInvite value=\"false\" />
            </entry>\r\n".                
            "--END_OF_PART\r\n".
            "Content-Type: ".$type.";\r\n\r\n".                
            $content."\r\n".                
            "--END_OF_PART--\r\n";
            $type = "multipart/related; boundary=END_OF_PART";