Skip to content

当header方法在data方法后调用,第一行数据会丢失 #535

@tw2066

Description

@tw2066
$config = [
    'path' => '/home/viest' // xlsx文件保存路径
];
$excel  = new \Vtiful\Kernel\Excel($config);

// fileName 会自动创建一个工作表,你可以自定义该工作表名称,工作表名称为可选参数
$filePath = $excel->fileName('tutorial01.xlsx', 'sheet1')
    
    ->data([
        ['Rent', 1000],
        ['Gas',  100],
        ['Food', 300],
        ['Gym',  50],
    ])
    ->header(['Item', 'Cost'])
    ->output();

当header方法在data方法后调用,['Rent', 1000] 记录会丢失

期望: 兼容一下,保证不丢失

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions