T
hank you Paul, that was the problem.

I have installed R into Dropbox and so am aware of access issues, I have to
pause syncing whenever I install a new package. I assumed that would work
here as well. Unfortunately even when DB sync is paused (or turned off) I
still can't read the file into Gdata. If I move it into another location,
say C:/Temp then its fine.

Annoying, but I will have to work around it for now.


-Robin



On Tue, Apr 2, 2013 at 4:41 AM, Paul Johnson <pauljohn32@gmail.com> wrote:

>
> On Apr 2, 2013 1:28 AM, "Robin Jeffries" <robin.a.jeffries@gmail.com>
> wrote:
> >
> > I can use gdata to successfully read in the example Excel file, but not
> any
> > other excel files. Why might this be the case? It seems that the problem
> > has something to do with opening the database but no indication as to
> what
> > the problem is. So i'm at a loss of how to fix it.
> >
> >
>
> would you please try this NOT a network share (Dropbox). I suspect File
> access issues cause this.  Lots of details under the hood there.
>
> Just check most obvious problem first.
>
> Next will need you give link to xls file in question. The gdata functions
> always work for me...
> Pj
>
> > > library(gdata)
> > gdata: read.xls support for 'XLS' (Excel 97-2004) files ENABLED.
> > gdata: read.xls support for 'XLSX' (Excel 2007+) files ENABLED.
> >
> > <snip>
> >
> > > test <-
> read.xls("C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx",
> > verbose=T)
> > Using perl at C:\Perl64\bin\perl.exe
> > Using perl at C:\Perl64\bin\perl.exe
> >
> > Converting xls file
> >     “C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx”
> > to csv  file
> >     “C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv”
> > ...
> >
> > Executing ' "C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/
> > xls2csv.pl" "C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx"
> > "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv" "1"
> '...
> >
> > Loading 'C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx'...
> > Done.
> >
> > Orignal Filename: C:/Dropbox/R/library/gdata/xls/ExampleExcelFile.xlsx
> > Number of Sheets: 4
> >
> > Writing sheet number 1 ('Sheet First') to file
> > 'C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv'
> > Minrow=0 Maxrow=7 Mincol=0 Maxcol=2
> >
> > 0
> >
> > Done.
> >
> > Reading csv file
> >  “C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bccd743d36.csv” ...
> > Done.
> >
> > This tells me that perl can be found, used, and my local temp directory
> can
> > be written/read to just fine. Now to try to read one of my own files.
> >
> >
> > > test <- read.xls("C:/Dropbox/Animals/LARPBO/Database.xlsx", verbose=T)
> > Using perl at C:\Perl64\bin\perl.exe
> > Using perl at C:\Perl64\bin\perl.exe
> >
> > Converting xls file
> >     “C:/Dropbox/Animals/LARPBO/Database.xlsx”
> > to csv  file
> >     “C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv”
> > ...
> >
> > Executing ' "C:\Perl64\bin\perl.exe" "C:/Dropbox/R/library/gdata/perl/
> > xls2csv.pl" "C:/Dropbox/Animals/LARPBO/Database.xlsx"
> > "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv" "1"
> > '...
> >
> > Unable to open file 'C:/Dropbox/Animals/LARPBO/Database.xlsx'.
> > 2
> >
> > Done.
> >
> > Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method,  :
> >   Intermediate file
> > 'C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv'
> missing!
> > In addition: Warning message:
> > running command '"C:\Perl64\bin\perl.exe"
> "C:/Dropbox/R/library/gdata/perl/
> > xls2csv.pl" "C:/Dropbox/Animals/LARPBO/Database.xlsx"
> > "C:\Users\Robin\AppData\Local\Temp\RtmpWkmGgn\file1bcc2cfe7499.csv" "1"'
> > had status 2
> > Error in file.exists(tfn) : invalid 'file' argument
> >
> > So it appears that it's a problem with the original Excel file. But
> there's
> > nothing that tells me what the problem actually is.
> >
> > Thanks
> > -Robin Jeffries
> >
> >         [[alternative HTML version deleted]]
> >
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
>
>

	[[alternative HTML version deleted]]

