Excel not able to be opened after export

(3 posts) (2 voices)

Tags:

No tags yet.

  1. jasmondluk, Member

    Received the error message "Excel cannot open the file ’MS6 收款記錄 Payment received history.xlsx’ because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file."

    select 'dbr.tab', 'Detail payment';
    select 'dbr.tab', 'Daily summary by Fee type';
    select 'dbr.tab', 'Daily summary by Pay type';
    select 'dbr.tab', 'Daily summary by Teacher';
    select 'dbr.tab', 'Daily summary by Classroom';

    select 'dbr.text', 'KidSmart(DP)';

    select 'DBR.crosstab' as 'DBR.crosstab', 'Pay type' as 'Pay type';

    select 'DBR.hsum' as 'DBR.hsum', 'value' as 'value';

    select 'DBR.sum' as 'DBR.sum', 'value' as 'value';

    select 'dbr.search', 1;

    select 'dbr.summary.text', 'Received by', 'Total';

    select 'dbr.subtitle', 'Payment Received History - Detail payment';

    select 'DBR.text' as 'DBR.text', 'Payment record inputted from Apr-21, 2022 to Apr-21, 2022 (According to entry date 根據輸入日期)' as 'concat(\'Payment record inputted from \',date_format(From_date,\'%b-%d, %Y\') ,\' to \', date_format(To_date,\'%b-%d, %Y\') ,\' (According to \', if(as_datetype=\'E\',\'entry date 根據輸入日期)\',\'pay date 根據付款日期)\' ))';

    select 'dbr.css', '.content {zoom: 0.7;}';

    select 'dbr.column.filter', 'Pay date', 'select';
    select 'dbr.column.filter', 'Center', 'select';
    select 'dbr.column.filter', 'Student', 'text';
    select 'dbr.column.filter', 'Name', 'select';
    select 'dbr.column.filter', 'Enrollment/Sales remarks', 'text';
    select 'dbr.column.filter', 'Account code', 'select';
    select 'dbr.column.filter', 'Received by', 'select';
    select 'dbr.column.filter', 'Course/Product', 'select';
    select 'dbr.column.filter', 'From', 'select';
    select 'dbr.column.filter', 'To', 'select';
    select 'dbr.column.filter', 'Payment remarks', 'text';
    select 'dbr.column.filter', 'Receipt remarks', 'text';

    select 'dbr.footerstyle', ' border: 1px solid gray;';
    select 'dbr.colstyle', 'Pay Ref', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Entry time', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Student', '[white-space:pre-wrap; border: 1px solid gray;max-width:300px;]';
    select 'dbr.colstyle', 'ID', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Course/Product', '[white-space:pre-wrap; border: 1px solid gray;max-width:300px;max-width:300px;]';
    select 'dbr.colstyle', 'Name', '[white-space:pre-wrap; border: 1px solid gray;max-width:300px;max-width:300px;]';
    select 'dbr.colstyle', 'Class no.', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Payment remarks', '[white-space:pre-wrap; border: 1px solid gray; max-width:200px;max-width:200px;]';
    select 'dbr.colstyle', 'Receipt remarks', '[white-space:pre-wrap; border: 1px solid gray; max-width:100px;max-width:100px;]';
    select 'dbr.colstyle', 'Enrollment/Sales remarks', '[white-space:pre-wrap; border: 1px solid gray;max-width:300px;max-width:300px;]';
    select 'dbr.colstyle', 'Account code', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Pay date', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'From', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'To', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.colstyle', 'Received by', '[white-space:pre; border: 1px solid gray;]';
    select 'dbr.hidecolumn', 'Date';
    select 'dbr.colstyle', '[value]', '[border: 1px solid gray;white-space:pre;color: black;]%.2f;[border: 1px solid gray;color: black;]%.2f;[border: 1px solid gray;color: red;]%.2f';

    select 'dbr.export.options', 'orientation', 'landscape';
    select 'dbr.export.options', 'paper_size', 'A4';
    select 'dbr.export.options', 'zoom_scale', 80;
    select 'dbr.wkhtmltopdf', '--margin-left 5 --margin-right 5 --margin-bottom 5 ';

    select 'dbr.crosstab.col', 'Cash', 'Cheque', 'Transfer';

    select '4564694' as 'Pay Ref', cast('2022-04-21' as date) as 'Pay date', cast('2022-04-21 17:53:28' as datetime) as 'Entry time', 'Ka Ching Tong' as 'Student', 'DP1718' as 'ID', 'RCRW' as 'Course/Product', 'Creative Reading And Writing (CRW) 閱讀理解及寫作課程(CRW)' as 'Name', '4' as 'Class no.', '2022-04-21' as 'From', '2022-05-12' as 'To', '' as 'Payment remarks', '' as 'Receipt remarks', 'Batch renewed on 自動續報時
    間2022-04-09 04:30:51' as 'Enrollment/Sales remarks', null as 'Account code', 'Flora Muk' as 'Received by', 'Cash' as 'Pay type', 864.0 as '[value]', cast('2022-04-21' as date) as 'Date'
    union all
    select '4564673', cast('2022-04-21' as date), cast('2022-04-21 17:06:30' as datetime), 'Ting Cheung Leung', 'DP1243', 'RCE', 'Cambridge 劍橋英語班', '4', '2022-04-22', '2022-05-13', '', '21/4/22 16:35 N42134340734', 'Batch renewed on 自動續報時
    間2022-04-02 04:30:51', null, 'Flora Muk', 'Bank Transfer', 810.0, cast('2022-04-21' as date)
    union all
    select '4564631', cast('2022-04-21' as date), cast('2022-04-21 16:05:38' as datetime), 'Tsun Ho Chan', 'DP1455', 'MRCS', 'Cambridge S/M/F 劍橋英語班', '0', '', '', '', '2022042122001491551437147301', 'Movers', null, 'Flora Muk', 'Alipay', 320.0, cast('2022-04-21' as date)
    union all
    select '4564616', cast('2022-04-21' as date), cast('2022-04-21 15:50:07' as datetime), 'See Ching Chiang', 'DP0094', 'RCE', 'Cambridge 劍橋英語班', '4', '2022-04-28', '2022-05-19', '', '', 'Batch renewed on 自動續報時
    間2022-04-13 04:30:51', null, 'Flora Muk', 'Cash', 810.0, cast('2022-04-21' as date)
    union all
    select '4564600', cast('2022-04-21' as date), cast('2022-04-21 15:25:49' as datetime), 'Ho Wai Chu', 'DP1269', 'RCE', 'Cambridge 劍橋英語班', '4', '2022-04-22', '2022-05-13', '', '21/4/22 14:56 N42134207811', 'Batch renewed on 自動續報時
    間2022-04-02 04:30:51', null, 'Flora Muk', 'Bank Transfer', 810.0, cast('2022-04-21' as date)
    union all
    select '4564592', cast('2022-04-21' as date), cast('2022-04-21 15:05:22' as datetime), 'Chi Sum Chan', 'DP0855', 'RGS', 'Grammar, Writing & Speaking 文法寫作會話班', '4', '2022-05-04', '2022-05-25', '', '', '', null, 'Flora Muk', 'Cash', 810.0, cast('2022-04-21' as date)
    union all
    select '4564545', cast('2022-04-21' as date), cast('2022-04-21 14:06:44' as datetime), 'Pak Fung Wong', 'DP1435', 'RCRW', 'Creative Reading And Writing (CRW) 閱讀理解及寫作課程(CRW)', '4', '2022-06-04', '2022-06-25', '', '012-100828 ', '', null, 'Flora Muk', 'Cheque', 864.0, cast('2022-04-21' as date)
    union all
    select '4564546', cast('2022-04-21' as date), cast('2022-04-21 14:06:44' as datetime), 'Pak Fung Wong', 'DP1435', 'MRCRW', 'Creative Reading and Writing 閱讀理解及寫作課程', '0', '', '', '', '012-100828', 'Lv 1', null, 'Flora Muk', 'Cheque', 400.0, cast('2022-04-21' as date)
    union all
    select '4564529', cast('2022-04-21' as date), cast('2022-04-21 13:54:18' as datetime), 'Hei Tung Law', 'DP1218', 'RDRI', 'RWI by Kidsmart', '4', '2022-04-28', '2022-05-19', '', '21/4 1:55', 'Batch renewed on 自動續報時
    間2022-04-13 04:30:51', null, 'Flora Muk', 'Bank Transfer', 1036.0, cast('2022-04-21' as date)
    union all
    select '4564526', cast('2022-04-21' as date), cast('2022-04-21 13:52:29' as datetime), 'Cheuk Hin Po', 'DP0858', 'RCRW', 'Creative Reading And Writing (CRW) 閱讀理解及寫作課程(CRW)', '4', '2022-04-21', '2022-05-12', '', '20220421220014123e27', 'Batch renewed on 自動續報時
    間2022-04-09 04:30:51', null, 'Flora Muk', 'Alipay', 864.0, cast('2022-04-21' as date)
    union all
    select '4564527', cast('2022-04-21' as date), cast('2022-04-21 13:52:29' as datetime), 'Cheuk Hin Po', 'DP0858', 'RDRI', 'RWI by Kidsmart', '4', '2022-04-23', '2022-05-14', '', '20220421220014123e27', 'Batch renewed on 自動續報時
    間2022-04-03 04:30:52', null, 'Flora Muk', 'Alipay', 1036.0, cast('2022-04-21' as date)
    union all
    select '4564426', cast('2022-04-21' as date), cast('2022-04-21 10:40:06' as datetime), 'Tsz Kiu Pang', 'DP1510', 'RDRI', 'RWI by Kidsmart', '4', '2022-04-21', '2022-05-12', '', '', '', null, 'Flora Muk', 'Cash', 1036.0, cast('2022-04-21' as date)
    union all
    select '4564427', cast('2022-04-21' as date), cast('2022-04-21 10:40:06' as datetime), 'Tsz Kiu Pang', 'DP1510', 'MRDSB', 'RWI by Kidsmart Sound Book', '0', '', '', '', '', 'Set 3', null, 'Flora Muk', 'Cash', 40.0, cast('2022-04-21' as date)
    union all
    select '4564420', cast('2022-04-21' as date), cast('2022-04-21 10:12:04' as datetime), 'Wing Ting Lo', 'DP1557', 'RDRI', 'RWI by Kidsmart', '4', '2022-04-29', '2022-05-20', '', '20/4/22 N42033307784', 'Batch renewed on 自動續報時
    間2022-04-14 04:30:51', null, 'Flora Muk', 'Bank Transfer', 1036.0, cast('2022-04-21' as date);

    select 'dbr.tab.next';

    select 'dbr.export.options', 'orientation', 'landscape';

    select 'dbr.text', 'KidSmart(DP)';

    select 'DBR.text' as 'DBR.text', 'Payment record inputted from Apr-21, 2022 to Apr-21, 2022 (According to entry date 根據輸入日期)' as 'concat(\'Payment record inputted from \',date_format(From_date,\'%b-%d, %Y\') ,\' to \', date_format(To_date,\'%b-%d, %Y\') ,\' (According to \', if(as_datetype=\'E\',\'entry date 根據輸入日期)\',\'pay date 根據付款日期)\' ))';

    select 'DBR.text' as 'DBR.text', 'To define summer course or related product, put the keyword \'Summer\' in the remarks of the course or product setup' as 'To define summer course or related product, put the keyword \'Summer\' in the remarks of the course or product setup', 'comment' as 'comment';

    select 'dbr.subtitle', 'Payment Received History - Daily Summary by Fee Type';

    select 'dbr.summary.text', 'Date', 'Total';

    select 'DBR.sum' as 'DBR.sum', 'Course fee' as 'Course fee', 'Product fee' as 'Product fee', 'Total' as 'Total';

    select 'dbr.search', 1;

    select 'dbr.hdr', 'Date';

    select 'dbr.summary.options', 'limit_summary_level', 0;
    select 'dbr.summary.options', 'skip_single_line_summary';

    select 'dbr.crosstab', 'Summer/Non-Summer';

    select 'dbr.column.filter', 'Date', 'select';

    select cast('2022-04-21' as date) as 'Date', 'Non-summer' as 'Summer/Non-Summer', 10736.0 as 'Total', 9976.0 as 'Course fee', 760.0 as 'Product fee';

    select 'dbr.tab.next';

    select 'dbr.export.options', 'orientation', 'landscape';
    select 'dbr.export.options', 'paper_size', 'A4';
    select 'dbr.export.options', 'zoom_scale', 50;

    select 'dbr.text', 'KidSmart(DP)';

    select 'DBR.text' as 'DBR.text', 'Payment record inputted from Apr-21, 2022 to Apr-21, 2022 (According to entry date 根據輸入日期)' as 'concat(\'Payment record inputted from \',date_format(From_date,\'%b-%d, %Y\') ,\' to \', date_format(To_date,\'%b-%d, %Y\') ,\' (According to \', if(as_datetype=\'E\',\'entry date 根據輸入日期)\',\'pay date 根據付款日期)\' ))';

    select 'dbr.search', 1;

    select 'dbr.subtitle', 'Payment Received History - Daily Summary by Pay Type';

    select 'dbr.crosstab', 'Pay type';

    select 'dbr.column.filter', 'Date', 'select';

    select 'dbr.sum', '[value]';

    select 'dbr.crosstab.col', 'Total';

    select cast('2022-04-21' as date) as 'Date', 'Total' as 'Pay type', 10736.0 as '[value]'
    union all
    select cast('2022-04-21' as date), 'Cheque', 1264.0
    union all
    select cast('2022-04-21' as date), 'Cash', 3560.0
    union all
    select cast('2022-04-21' as date), 'Bank Transfer', 3692.0
    union all
    select cast('2022-04-21' as date), 'Alipay', 2220.0;

    select 'dbr.tab.next';

    select 'dbr.export.options', 'orientation', 'landscape';
    select 'dbr.export.options', 'paper_size', 'A4';
    select 'dbr.export.options', 'zoom_scale', 50;

    select 'dbr.text', 'KidSmart(DP)';

    select 'DBR.text' as 'DBR.text', 'Payment record inputted from Apr-21, 2022 to Apr-21, 2022 (According to entry date 根據輸入日期)' as 'concat(\'Payment record inputted from \',date_format(From_date,\'%b-%d, %Y\') ,\' to \', date_format(To_date,\'%b-%d, %Y\') ,\' (According to \', if(as_datetype=\'E\',\'entry date 根據輸入日期)\',\'pay date 根據付款日期)\' ))';

    select 'dbr.search', 1;

    select 'dbr.subtitle', 'Payment Received History - Daily Summary by Teacher';

    select 'dbr.crosstab', 'Teacher (1st class teacher at pay time)';

    select 'dbr.column.filter', 'Date', 'select';

    select 'dbr.sum', '[value]';

    select 'dbr.crosstab.col', 'Total';
    ;

    select 'dbr.tab.next';

    select 'dbr.export.options', 'orientation', 'landscape';
    select 'dbr.export.options', 'paper_size', 'A4';
    select 'dbr.export.options', 'zoom_scale', 50;

    select 'dbr.text', 'KidSmart(DP)';

    select 'DBR.text' as 'DBR.text', 'Payment record inputted from Apr-21, 2022 to Apr-21, 2022 (According to entry date 根據輸入日期)' as 'concat(\'Payment record inputted from \',date_format(From_date,\'%b-%d, %Y\') ,\' to \', date_format(To_date,\'%b-%d, %Y\') ,\' (According to \', if(as_datetype=\'E\',\'entry date 根據輸入日期)\',\'pay date 根據付款日期)\' ))';

    select 'dbr.search', 1;

    select 'dbr.subtitle', 'Payment Received History - Daily Summary by Classroom';

    select 'dbr.crosstab', 'Classroom (1st class classroom at pay time)';

    select 'dbr.column.filter', 'Date', 'select';

    select 'dbr.sum', '[value]';

    select 'dbr.crosstab.col', 'Total';
    ;

  2. myDBR Team, Key Master

    Can you open a support ticket in support email and attach the SQL-export as an attachment. Please also attach the generated Excel document.

    The code above might be not a full export as it exports into Excel without errors.

    --
    myDBR Team

  3. myDBR Team, Key Master

    The PHP multibyte string extension (mbstring) is required for Excel exports.

    --
    myDBR Team


Reply

You must log in to post.