Skip to content

CSV.foreach for csv files inside of Archive  #4

Description

@mrbilousov

My code:

Zip::Archive.open(file.path) do |archive|
      archive.each do |inner_file|
        file_name = inner_file.name.split('.')[0]

        CSV.parse(inner_file.read, headers: :first_line) do |row|
          -----
          some_code
          -----
        end
      end
    end

But I'd like to use CSV.foreach for that file content, but cannot get it working.. any suggestion?

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