[R] read password-protected files

Shi, Tao shidaxia at yahoo.com
Thu Mar 31 23:22:25 CEST 2011


Thanks, Henrique!  I'll try that.

...Tao



----- Original Message ----
> From: Henrique Dallazuanna <wwwhsd at gmail.com>
> To: "Shi, Tao" <shidaxia at yahoo.com>
> Cc: Prof Brian Ripley <ripley at stats.ox.ac.uk>; r-help at r-project.org
> Sent: Thu, March 31, 2011 12:00:45 PM
> Subject: Re: [R] read password-protected files
> 
> Using RDCOMCliente:
> 
> library(RDCOMClient)
> eApp <-  COMCreate("Excel.Application")
> wk <-  eApp$Workbooks()$Open(Filename="your_file",Password="your_password")
> tf <-  tempfile()
> wk$Sheets(1)$SaveAs(tf, 3)
> 
> DF <-  read.table(sprintf("%s.txt", tf), header = TRUE, sep = "\t")
> 
> On Thu, Mar  31, 2011 at 3:33 PM, Shi, Tao <shidaxia at yahoo.com> wrote:
> > Hi  Josh and Prof. Ripley,
> >
> > Thanks for the quick  replies!
> >
> > Sorry about the HTML email.  It's the default for my  yahoo account and 
>forgot to
> > switch.
> >
> > The question was  asked by a colleague of mine.  After double-checking, yes, 
>they
> > are  actually Excel files.  Any idea on how to approach this?
> >
> >  Thanks!
> >
> > ...Tao
> >
> >
> >
> >  ________________________________
> > From: Prof Brian Ripley <ripley at stats.ox.ac.uk>
> >
> >  Cc: r-help at r-project.org
> > Sent: Thu,  March 31, 2011 11:15:35 AM
> > Subject: Re: [R] read password-protected  files
> >
> > On Thu, 31 Mar 2011, Shi, Tao wrote:
> >
> >>  Hi list,
> >>
> >> I have a bunch of .csv files that are  password-protected.  I wonder if 
>there
> > is
> >
> > There is  nothing in the CSV standard about password protection.  I
> > very much  doubt that these actually CSV files.  So please follow the
> > posting guide  [*]
> >
> >> a way to read them in in R without manually removing the  password 
>protection
> >>for
> >> each file?
> >>
> >  [[elided Yahoo spam]]
> >>
> >>
> >> ...Tao
> >>      [[alternative HTML version deleted]]
> >>
> >>  ______________________________________________
> >> R-help at 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.
> >
> > [*] as above: and as  you sent HTML you are either full of contempt for
> > the helpeRs or failed  to do your homework.
> >
> >
> > --
> > Brian D. Ripley,                   ripley at stats.ox.ac.uk
> > Professor  of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
> > University of  Oxford,             Tel:  +44 1865 272861 (self)
> > 1 South Parks Road,                      +44 1865 272866 (PA)
> > Oxford OX1 3TG, UK                 Fax:  +44 1865 272595
> >
> >  ______________________________________________
> > R-help at 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.
> >
> 
> 
> 
> -- 
> Henrique  Dallazuanna
> Curitiba-Paraná-Brasil
> 25° 25' 40" S 49° 16' 22" O
>



More information about the R-help mailing list