Skip to content

cfspreadsheet action="read" format="csv" ignores empty fields in xls/xlsx file #53

Description

@xouqoa

If you read an Excel file which has empty cells and use the CSV format, the output from the CSV function ignores any empty fields.

I believe the cause of this is in the parseRowData function in Spreadsheet.cfc, line #2869.

With the change below, it should pick up the empty ones. (Untested, not sure how to replace the file once the extension is installed, and stupid IIS won't let me upload the zip file locally on my machine.)

-- var elements = listToArray( arguments.line, arguments.delimiter );

++ var elements = listToArray( arguments.line, arguments.delimiter, true );

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions