in reply to Spreadsheet::Read Open File from the cloud
You will have to perform the additional step of downloading the file first. This is easy using HTTP::Tiny or LWP::UserAgent:
#!perl use strict; use warnings; use HTTP::Tiny; use Spreadsheet::Read; # Fetch data and return a filehandle to that data sub fetch_url { my( $url ) = @_; my $ua = HTTP::Tiny->new; my $res = $ua->get( $url ); open my $fh, '<', \$res->{content}; return $fh } my $fh = fetch_url('http://example.com/example.ods'); my $sheet = Spreadsheet::Read->new( $fh, parser => 'ods' );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Spreadsheet::Read Open File from the cloud
by vitoco (Hermit) on Oct 01, 2019 at 14:09 UTC | |
by ikegami (Patriarch) on Oct 01, 2019 at 15:47 UTC |