私は1つのxlsbを持っています。(ms Excel 2007) ファイルが作成されました。
私はそれをサーバーにアップロードし、ウェブサイトのユーザーはそれをダウンロードできますが、ユーザーがこのファイルをダウンロードして開くと、MS Excel は「はい」をクリックすると「Excel で読み取り不能なコンテンツが見つかりました」というエラーが表示されます。このエラーが表示される理由がわかりません。
次に、このxlsbファイルをgmailとyahoomailから送信しました。ダウンロードして開くと、すべて問題なく、エラーメッセージも表示されません。
このエラーを修正するのを手伝ってください。サーバー側の言語としてphpを使用しており、ダウンロードコードは以下のとおりです
header('Content-type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
//header('Content-type: application/octet-stream');
//header('Content-type: application/vnd.ms-excel.sheet.binary.macroEnabled.12');
header('Content-Disposition: attachment; filename="credit-card-payoff.xlsb"');
readfile('exporting/excel/credit-card-payoff.xlsb');
別のコンテンツ タイプを試しましたが、成功しませんでした。
以下は、ユーザーがExcelをダウンロードできるWebページです
http://utc.impexdirectory.com/credit-card-payoff-calculator.php