Why Excel file is malformed?

Active3 hr before
Viewed126 times

2 Answers


Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers ,Making statements based on opinion; back them up with references or personal experience.,When you open the file, I see a bunch of obscure characters, even if the encoding is normal, Ensure that absolutely nothing is being sent to your browser, other than the Excel data; and make sure that your headers are appropriate for an Excel file, and not for html instead – Mark Baker Oct 6 '15 at 11:24

I use laravel 5 and laravel excel. laravel excel: http://www.maatwebsite.nl/laravel-excel/docs

Excel::create('users', function($excel) {
      $excel - > sheet('sheet', function($sheet) {
         $admin = App\ User::find(200000);
         $clients = App\ User::getUserClientsIdAll($admin - > id);
         $sheet - > loadView('admin.excel.users', [
            'user' => $admin,
            'clients' => $clients,
            'isAdmin' => true
   }) - >
   export ($format);
load more v

I get a malformed file when I try upload a simple excel file with python sdk, Malformed file when uploading excel file with pyth... ,/t5/Dropbox-API-Support-Feedback/Malformed-file-when-uploading-excel-file-with-python-sdk/td-p/249172,@LiamGM Please open a new thread with more details on the issue you're seeing so we can take a look.

my code looks like:

xls = 'Path\\xxxxx.xlsx'
with open(xls, 'r') as upxls:
   dbx.files_upload(upxlsx.read(), '/test.xlsx', mode = dropbox.files.WriteMode("overwrite"))
except Exception as e:
   print e

Other "undefined-undefined" queries related to "Why Excel file is malformed?"