Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: elementary import

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114125] Re: elementary import
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Wed, 24 Nov 2010 07:00:05 -0500 (EST)

On 11/23/10 at 5:58 AM, fgutiers2002 at yahoo.com (Francisco Gutierrez)
wrote:

>This is a very basic import question. I've got this Excel
>spreadsheet, and to miantain my data ordered I have stored it in a
>drive different from C. It is called seg, and saved in drive J, in a
>folder called ejstat, so:  J:/ejstat

>However, when I want to import it into Mathematica (7 or 8) I run
>into problems. For example: SetDirectory["J:"]
>Import["ejstat\seg.xls", "XLS"]

If you are going to specifically write the path I think you need
to write as:

Import["ejstat\\seg.xls", "XLS"]

on a Windows system. Note, I am writing this on a Mac and cannot
test it to be sure. However, you can avoid machine dependencies
here by doing:

Import[ToFlileName["ejstat", "seg.xls"], "XLS"]

If the file were nested in a deeper directory, the first
argument would be a list of all of the directories in order to
get to the file you want.

=46or more information look up $PathnameSeparator and ToFileName
in the DocumentCenter



  • Prev by Date: Re: TeXForm issue
  • Next by Date: Re: maximum of a series
  • Previous by thread: elementary import
  • Next by thread: Re: Importing data