Author Topic: Import from Excel into properties  (Read 3541 times)

artem

  • New Members
  • *
  • Posts: 22
Import from Excel into properties
« on: April 14, 2014, 01:58:15 PM »
"Importing from Excel into properties" is the main interaction script for me between IMatch and other software as any data can be easily pasted and processed in Excel. Script works fine in IMatch 3, but in IMatch 5 it produces many errors. This is an initial script:

http://pastebin.com/Ar28LnXn

I tried to change mistakes according to "3 to 5" IMatch guide — http://pastebin.com/8EcR64A6 , but on line 46 I get this one:

IMatch.WaitDialogOpen "Importing...",0,oWs.Cells.SpecialCells(xlCellTypeLastCell).Row - 1,True

IMatch doesn't have anything according WaitDialogOpen method, so I don't know what kind of replacement should I use. Any help is appreciated.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 28532
Re: Import from Excel into properties
« Reply #1 on: April 14, 2014, 02:54:42 PM »
Have you tried the CSV Import Module available in the Import & Export panel?
This module can import data in CSV format into IMatch Attributes and into Metadata. The CSV import was introduced in the last build. See the help for details.

artem

  • New Members
  • *
  • Posts: 22
Re: Import from Excel into properties
« Reply #2 on: April 14, 2014, 03:09:36 PM »
Yes, I tried, but it fails with strange mistake:

 

Some problem in file file:///C:/ProgramData/photools.com/IMatch5/scripts/system/CSV%20Import/UI.html, line 275, symbol 4, "Unallowed symbol".

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 28532
Re: Import from Excel into properties
« Reply #3 on: April 14, 2014, 07:07:31 PM »
And this error happens when?
Have you already loaded a file? If, please attach.

The error happens when the JavaScript JSON parser analyzes the columns to display them in the user interface.

Do other scripts work?
Do the other scripts with HTML interfaces work, e.g. the RegEx Tester or the Metadata into Attributes importer?

artem

  • New Members
  • *
  • Posts: 22
Re: Import from Excel into properties
« Reply #4 on: April 14, 2014, 07:27:40 PM »
Unfortunately (or fortunately) I can't reproduce that mistake right now. It's strange as it was at least several times. Now all work fine, I will try to investigate.

Mistake raised immediately after pushing "Run" button for CVS file import.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 28532
Re: Import from Excel into properties
« Reply #5 on: April 14, 2014, 08:51:07 PM »
When you run the importer for the first time, it will have no 'previous' file and thus it will not try to load it.
When you run the importer later again, it restores the file name of the previously loaded file and read it to show the columns.

I would need to know under which condition this happens.

artem

  • New Members
  • *
  • Posts: 22
Re: Import from Excel into properties
« Reply #6 on: April 14, 2014, 09:07:18 PM »
I tried to open many files during my previous working session with IMatch and got mistakes for every file I tried to open.

After rebooting PC I have read your message, started IMatch and couldn't reproduce that bug. And yes, every time I am starting import now, I see that "File name" field has file name. So maybe problem has disappeared after restarting IMatch, who knows. If I get this mistake one more time, I will let you know.

Mario

  • IMatch Developer
  • Administrator
  • *****
  • Posts: 28532
Re: Import from Excel into properties
« Reply #7 on: April 15, 2014, 08:05:55 AM »
That would be good. I have no test files with data in Cyrillic here (you can send me one for my test collection if you like, see email below or just attach). If this is somehow caused by the character set in the file or something that would allow me to repro it.

But the script works internally in 16-Bit Unicode and the scripting routines it uses can load files in all encodings, including UTF-8 and UTF-16 so there is no real reason for character-set induced trouble.

If you can repro it again with one of your files, let me know.