+ Reply to Thread
Results 1 to 4 of 4

PowerPivot Importing

  1. #1
    Registered User
    Join Date
    11-09-2012
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2010
    Posts
    3

    PowerPivot Importing

    I’m working on my first project with PowerPivot (2010 version) and have quickly run into a problem. I am importing data from a text file and one of the fields is an item number with a text/string data type. The problem is that in the import wizard window all of the sample records just happen to be numeric in this field. PowerPivot sees this and assigns the field a whole number data type. When the rest of the file is read any record with an alpha character is imported as blank. Is there a way to prevent this? I’ve never seen an import procedure where you can’t set the data type manually.

    Edit: I have tried to change the data type post import and then click the refresh button, but it didn't work.
    Last edited by ClevelandSteve; 05-16-2013 at 03:03 PM.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: PowerPivot Importing

    the simplest way is to create a schema.ini file in the same directory-it can be as simple as

    [filenamehere.txt]
    ColNameHeader=True
    MaxScanRows=0

    which should make PP scan all rows to determine data type. you can also specify datatypes for all columns if you prefer
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: PowerPivot Importing

    for reference of schema.ini file structures see http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

  4. #4
    Registered User
    Join Date
    11-09-2012
    Location
    Cleveland, OH
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: PowerPivot Importing

    That works, thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1