Reading an excel file

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reading an excel file

Bernard Comcast
What is the best way to read in data of any type from an Excel 2016 .xlsx file?

Thanks

Bernard
Sent from my iPhone so please excuse the spelling!"
______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Reading an excel file

Hasan Diwan-2
 https://cran.r-project.org/web/packages/xlsx/xlsx.pdf

You'll need the JDK (>= 1.6) -- H

On Thu, 10 Jan 2019 at 13:40, Bernard Comcast <[hidden email]>
wrote:

> What is the best way to read in data of any type from an Excel 2016 .xlsx
> file?
>
> Thanks
>
> Bernard
> Sent from my iPhone so please excuse the spelling!"
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>


--
OpenPGP:
https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
If you wish to request my time, please do so using
*bit.ly/hd1AppointmentRequest
<http://bit.ly/hd1AppointmentRequest>*.
Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
<http://bit.ly/hd1AppointmentRequest>*.

<https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1>Sent
from my mobile device
Envoye de mon portable

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Reading an excel file

Bert Gunter-2
In reply to this post by Bernard Comcast
Don't!

Well, I know that being a wiseguy is not helpful, but this "advice" is
actually not entirely unhelpful. Search on "input Excel file" or similar on
rseek.org to bring up many links, including the readxl package, tutorials,
the R data import/export manual, etc. However, excel files are notoriously
"unstructured," and you would probably be better off converting your data
in tabular form to a .csv or .txt file and reading in from there (using
read.table, read.csv, etc.) . The linked references (and advice from others
with more experience) should be consulted for details.

Cheers,
Bert

Bert Gunter

"The trouble with having an open mind is that people keep coming along and
sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )


On Thu, Jan 10, 2019 at 1:40 PM Bernard Comcast <
[hidden email]> wrote:

> What is the best way to read in data of any type from an Excel 2016 .xlsx
> file?
>
> Thanks
>
> Bernard
> Sent from my iPhone so please excuse the spelling!"
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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]]

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Reading an excel file

Albrecht Kauffmann-2
In reply to this post by Hasan Diwan-2
read.xlsx() works well if the xlsx-file has not too much joined cells. Particularly in the latter case I would recommend to convert the xlsx-file into csv format and then read.csv().

Greetings
Albrecht

--
  Albrecht Kauffmann
  [hidden email]

Am Do, 10. Jan 2019, um 22:43, schrieb Hasan Diwan:

>  https://cran.r-project.org/web/packages/xlsx/xlsx.pdf
>
> You'll need the JDK (>= 1.6) -- H
>
> On Thu, 10 Jan 2019 at 13:40, Bernard Comcast <[hidden email]>
> wrote:
>
> > What is the best way to read in data of any type from an Excel 2016 .xlsx
> > file?
> >
> > Thanks
> >
> > Bernard
> > Sent from my iPhone so please excuse the spelling!"
> > ______________________________________________
> > [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> > 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.
> >
>
>
> --
> OpenPGP:
> https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1
> If you wish to request my time, please do so using
> *bit.ly/hd1AppointmentRequest
> <http://bit.ly/hd1AppointmentRequest>*.
> Si vous voudrais faire connnaisance, allez a *bit.ly/hd1AppointmentRequest
> <http://bit.ly/hd1AppointmentRequest>*.
>
> <https://sks-keyservers.net/pks/lookup?op=get&search=0xFEBAD7FFD041BBA1>Sent
> from my mobile device
> Envoye de mon portable
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.
Reply | Threaded
Open this post in threaded view
|

Re: Reading an excel file

rsherry8
In reply to this post by Bernard Comcast
The way I have done it in the past is to convert to an CSV file. One
advantage of this approach is that should my
r script accidental write to the file, my original Excel file is not
damaged.

Bob Sherry

On 1/10/2019 4:39 PM, Bernard Comcast wrote:

> What is the best way to read in data of any type from an Excel 2016 .xlsx file?
>
> Thanks
>
> Bernard
> Sent from my iPhone so please excuse the spelling!"
> ______________________________________________
> [hidden email] mailing list -- To UNSUBSCRIBE and more, see
> 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.
>

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
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.