<!-- Generated by pkgdown: do not edit by hand --><htmllang="en"><head><metahttp-equiv="Content-Type"content="text/html; charset=UTF-8"><metacharset="utf-8"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><title>Import data from a file — import-file • freesearcheR</title><scriptsrc="../deps/jquery-3.6.0/jquery-3.6.0.min.js"></script><metaname="viewport"content="width=device-width, initial-scale=1, shrink-to-fit=no"><linkhref="../deps/bootstrap-5.3.1/bootstrap.min.css"rel="stylesheet"><scriptsrc="../deps/bootstrap-5.3.1/bootstrap.bundle.min.js"></script><linkhref="../deps/Montserrat-0.4.9/font.css"rel="stylesheet"><linkhref="../deps/Public_Sans-0.4.9/font.css"rel="stylesheet"><linkhref="../deps/font-awesome-6.5.2/css/all.min.css"rel="stylesheet"><linkhref="../deps/font-awesome-6.5.2/css/v4-shims.min.css"rel="stylesheet"><scriptsrc="../deps/headroom-0.11.0/headroom.min.js"></script><scriptsrc="../deps/headroom-0.11.0/jQuery.headroom.min.js"></script><scriptsrc="../deps/bootstrap-toc-1.0.1/bootstrap-toc.min.js"></script><scriptsrc="../deps/clipboard.js-2.0.11/clipboard.min.js"></script><scriptsrc="../deps/search-1.0.0/autocomplete.jquery.min.js"></script><scriptsrc="../deps/search-1.0.0/fuse.min.js"></script><scriptsrc="../deps/search-1.0.0/mark.min.js"></script><!-- pkgdown --><scriptsrc="../pkgdown.js"></script><linkhref="../extra.css"rel="stylesheet"><metaproperty="og:title"content="Import data from a file — import-file"><metaname="description"content="Let user upload a file and import data"><metaproperty="og:description"content="Let user upload a file and import data"></head><body>
<ahref="#main"class="visually-hidden-focusable">Skip to contents</a>
<liclass="nav-item"><aclass="external-link nav-link"href="https://github.com/agdamsbo/freesearcheR/"aria-label="GitHub"><spanclass="fa fab fa-github fa-lg"></span></a></li>
<dd><p>File extensions accepted by <code><ahref="https://rdrr.io/pkg/shiny/man/fileInput.html"class="external-link">shiny::fileInput()</a></code>, can also be MIME type.</p></dd>
<dd><p>Named list with custom function(s) to read data:</p><ul><li><p>the name must be the extension of the files to which the function will be applied</p></li>
<li><p>the value must be a function that can have 5 arguments (you can ignore some of them, but you have to use the same names),
passed by user through the interface:</p><ul><li><p><code>file</code>: path to the file</p></li>
<li><p><code>sheet</code>: for Excel files, sheet to read</p></li>
<li><p><code>skip</code>: number of row to skip</p></li>