diff --git a/visidata/loaders/xlsx.py b/visidata/loaders/xlsx.py index 834035d06..8fc462588 100644 --- a/visidata/loaders/xlsx.py +++ b/visidata/loaders/xlsx.py @@ -14,10 +14,12 @@ @VisiData.api def open_xls(vd, p): + p.is_local() or vd.fail('xls loader does not support remote files') return XlsIndexSheet(p.base_stem, source=p) @VisiData.api def open_xlsx(vd, p): + p.is_local() or vd.fail('xlsx loader does not support remote files') return XlsxIndexSheet(p.base_stem, source=p) class XlsxIndexSheet(IndexSheet): diff --git a/visidata/path.py b/visidata/path.py index d272b8aa7..d5564b622 100644 --- a/visidata/path.py +++ b/visidata/path.py @@ -361,7 +361,7 @@ def is_fifo(self): def is_local(self): 'Return True if self.filename refers to a file on the local disk.' - return not bool(self.fp) and not bool(self.fptext) + return not bool(self.is_url()) and not bool(self.fp) and not bool(self.fptext) def is_url(self): 'Return True if the given path appears to be a URL.'