Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mike Hamilton 7 posts 27 karma points
    Dec 11, 2012 @ 00:50
    Mike Hamilton
    0

    Error importing an Excel file from a saved Import Definition

    Hi,

    We're a paid CMSImport customer and we're having trouble importing Excel data from a saved import definition. Specifically, the exact error we recieve says:

    Your uploaded file is invalid, the following errors occured:

    • The uploaded file is invalid make sure it's of the right type

    The original file we used to create the definition was a .xlsx. This new (updated) file is also a .xlsx. I don't understand why I'm seeing this error...any help would be greatly appreciated.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 11, 2012 @ 10:40
    Richard Soeteman
    0

    Hi Mike,

    Could it be that the Excel has some locked columns. What could help is create a new Excel file copy paste data over. But I'm interested in the Excel sheet, if you can share it that would be very nice. Then I can contact the Component vendor of the Excel component also (Didn't write this component myself) to sort this issue.

    Hope to hear from you.

    Thanks,

    Richard

  • Mike Hamilton 7 posts 27 karma points
    Dec 11, 2012 @ 20:20
    Mike Hamilton
    0

    E-mail sent (with Excel file attached). Thanks for your help!

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 12, 2012 @ 08:02
    Richard Soeteman
    0

    Hi,

    At first I could import the Excel file without any issues. Then I deleted the file DTG.Spreadsheet.dll from the bin folder and got the same error as you had. Restored it and it all worked fine. Can you please check if the DTG.Spreadsheet.dll is in your bin folder? I will update the error in case the dll is missing for the next version (2.3) of CMSImport.

    Cheers,

    Richard

  • Mike Hamilton 7 posts 27 karma points
    Dec 12, 2012 @ 19:11
    Mike Hamilton
    0

    Ok, I have confirmed that DTG.Spreadsheet.dll *is* in our /bin folder. The version is 2.7.0.0

    Do you have any other recommendations? Did you notice anything weird in the Excel file?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 13, 2012 @ 08:54
    Richard Soeteman
    0

    Hi Mike,

    Sorry for the delay. Can you try if you can use the file in the normal import wizard? The only thing about the Excel file I noticed that it wasn't opening on my Ipad. What I will do is send the file back removing all Markup so we can see if that was causing the issue.

    Thanks,

    Richard

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 13, 2012 @ 09:54
    Richard Soeteman
    0

    HI Mike,

    Can you check if the worksheet name of the original was also "header" Just got an error in a similar case where they renamed the worksheet. Then CMSImport can't find the worksheet anymore and an error occurs.

    Thanks,

    Richard

  • Mike Hamilton 7 posts 27 karma points
    Dec 13, 2012 @ 17:39
    Mike Hamilton
    0

    Hey Richard,

    A few notes: I checked the original file and the tab was indeed called "Header". So the name hasn't changed between the original Excel and the updated Excel.

    I was able to create a new definition and load the new Excel file just fine. So I then tried to re-run the definition with the ORIGINAL file and it's not working anymore! Is there some way to export the definition file so you can take a look at it? I have a strong feeling that there's not a problem with the file but with either the saved definition or with something inside CMSImport.

    The definition was originally created on Umbraco 4.9 but we've since upgraded to 4.11.1. Do you think it's possible that something has changed internally in Umbraco between 4.9 and 4.11.1 that could be causing this saved definition to not work anymore?

    Again, much thanks for your support. I'm sure we'll get this figured out!

    -Mike

     

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 13, 2012 @ 20:46
    Richard Soeteman
    0

    Hi Mike,

    That is weird, so the new definition works only when you use the new file? I can change the file every time. But if you can export the cmsimportstate table I can load it into my dev environment but this is really strange, I must admit I never update environments so never tested that scenario and therefore it's not impossible something happened during the upgrade.

    Hope to hear from you.

    Thanks,

    Richard

  • Mike Hamilton 7 posts 27 karma points
    Dec 14, 2012 @ 16:48
    Mike Hamilton
    0

    Oh, sorry Richard, what I meant to say is:

    • Old definition - NEITHER file works anymore (the original or the update)
    • New definition - BOTH files load just fine

    I'm okay with creating a new definition, we're just worried that the next time we get another update from our client we'll run into the same problem, and have to keep re-creating the definition over and over again. As you can see this Excel file has several HUNDRED columns and it takes a long time to map them all (the Umbraco Document Type we're mapping to doesn't have properties with the same names as the Excel columns).

    I'll send over the cmsimportstate table. If you don't mind taking a look at it when you get some time that would be great.

    -Mike

  • Mike Hamilton 7 posts 27 karma points
    Dec 14, 2012 @ 17:22
    Mike Hamilton
    0

    Hey, just a quick update: We've been looking at the data in the cmsimportstate table. The ImportState column where all the serialized data is stored is an NVARCHAR(MAX). We think that our import is SO big that it's exceeding the column size and is truncating the mapping data. We noticed that when we Base64 decoded the data in that column that it looks like it's chopping off the end of the string.

    That would also explain why we're able to load our file from a NEW definition (since it's running from memory), but unable to import any file from our saved definition (its getting corrupted when we save it).

    Would it be possible to change the type of the ImportState column to TEXT? Some SQL functionality like pivoting won't work on a TEXT field, but it would be large enough to store an import regardless of the number of columns.

    I'll do an export of the table for you to take a look at yourself. But I think this might get us on the right track to resolving our problem!

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Dec 15, 2012 @ 06:39
    Richard Soeteman
    0

    HI Mike,

    Yes you can change it to Text, it was Varchar(Max). But I've just tested to remove a few chars that and gives met a 'Invalid length for a Base-64 char array or string.' error. Would love to have the state data, then I can load that into my development environment since I never had this issue before and it's really weird.

    Thanks,

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft