[R] Read shortcuts of MS Excel files through R

Sarah Goslee sarah.goslee at gmail.com
Fri Sep 27 00:05:38 CEST 2013


Hi,

On Thu, Sep 26, 2013 at 4:54 PM, Santosh <santosh2005 at gmail.com> wrote:
> Dear Rxperts,
>
> Through Windows OS, I created shortcuts (paste as shortcut) to excel
> spreadsheets ( with "xlsx" as the file extension). I wasn't able to read
> the shortcuts through R and using "read" functions of "xlsx" package.

A shortcut isn't an Excel file: it's the operating system that figures
that out. The shortcut itself is just a note to Windows with a file
reference in it. I wouldn't expect R to be able to parse that
reference.

Sarah


> exf <- "a1.xlsx.lnk"
>
>> read.xlsx(exf,1)
> Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
>   java.lang.IllegalArgumentException: Your InputStream was neither an OLE2
> stream, nor an OOXML stream
>> read.xlsx2(exf,1)
> Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl,  :
>   java.lang.IllegalArgumentException: Your InputStream was neither an OLE2
> stream, nor an OOXML stream
>
>
> Would truly appreciate your suggestions.
>
> Regards,
> Santosh
>


-- 
Sarah Goslee
http://www.functionaldiversity.org



More information about the R-help mailing list