[prev in list] [next in list] [prev in thread] [next in thread]
List: sas-l
Subject: SAS Forum:Import excel by defining type of variables
From: Roger Deangelis <roger_deangelis () COMCAST ! NET>
Date: 2022-01-14 16:48:46
Message-ID: 5813105235981583.WA.rogerdeangeliscomcast.net () listserv ! uga ! edu
[Download RAW message or body]
SAS Forum:Import excel by defining type of variables \
\
Import excel by defining type of variables \
\
\
\
SAS Forum \
https://tinyurl.com/2m32dh8t \
https://communities.sas.com/t5/SAS-Programming/import-excel-by-defining-type-of-variables/m-p/790135 \
\
You can use sas passthru and ms Access functions to get the type an length of \
columns before import
\
see \
https://goo.gl/Ap0A0p \
https://github.com/rogerjdeangelis/utl_excel_fix_type_length_on_import \
\
Or you can use R XLConnect (coltype option)> Probably more Python and R Packages \
with this capability.
\
colTypes \
\
Column types to use when reading in the data. Specified as a character vector of the \
corresponding type names (see XLC; XLC$DATA_TYPE.<?>). You may also use R \
class names such as numeric, character, logical and POSIXt. The types are \
applied in the given order to the columns - elements are recycled if \
necessary. Defaults to character(0) meaning that column types are determined autom \
atically (see the Note section for more information). By default, type conversions \
are only applied if the specified column type is a more generic type (e.g. \
from Numeric to String) - otherwise NA is returned. The forceConversion flag \
can be set to force conversion into less generic types where \
possible.
\
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic