1. limetree
  2. RO CSVI
  3. Thursday, 16 February 2017
  4.  Subscribe via email
HI,
I've set up serveral crons for four different files. It worked well, but some how, suddenly CSVI couldn't read the XLS-file. I want to know what the difference are between the attached files. Two files are not working (Import file contains 0 lines) and two are working they all have the same information but different file sizes.

Question 1 - a) What are the diffences between the files. b) Why don't the other two files work. c) What to do make the two files to work

Works (both files below I've clear format in Excel)

  1. feeanna_products.xls [90kb]

  2. feeanna_products_test_format.xls [65kb]



Don't work (both files below I've clear format in Excel)

  1. feeanna_products_dont work.xls [96kb]

  2. feeanna_products_dont work_format test.xls [72kb]



Question 2

Field published_up (column O) looks ok in CSVI preview (16/02/2017 10:08) but when imported it becomes -1-11-30 00:00:00. a) How to correct that? b) Any way to get todays date and time (time when importing) automatically in import template?

Question 3

Field alias (columnB) and field Product features_Item no: (columnG) are the same. a) Is there a way to "copy" one column to another in the import template so you only have to fill in one column? b) Some fields are always the same like access and published. It should always be 1. Is there a way to make an override or something in the template so you don't have to fill them in at all?

Thank you!
Regards
Andy
Accepted Answer Pending Moderation
Hello Andy,
Question 1 - a) What are the diffences between the files. b) Why don't the other two files work. c) What to do make the two files to work


In the files which don't work, there is an invalid character in value corner_rack_e.jpg, you can search for this value, remove it and run the import. You can see the file loading in import preview.

Question 2

Field published_up (column O) looks ok in CSVI preview (16/02/2017 10:08) but when imported it becomes -1-11-30 00:00:00. a) How to correct that? b) Any way to get todays date and time (time when importing) automatically in import template?

The preview page is to show what is in your import file so the date is shown as in your file. The actual date format supported by database is YYYY-mm-dd H:i:s since your date is not in this format, the date is imported as 0000-00-00 00:00:00 in database tables. I could see this by running import with your file here. The value -1-11-30 00:00:00. looks like how K2 interprets the date. Please check the date stored in your database tables.
To have today's date and time in import there are two ways to do it. One is that you can create a override for import and write some code for publish_up field to get current date and time. The second option is you set default value for publish_up field in template fields so CSVI will import the default value. Please note that you need to change this default date value to current date manually whenever you run the import.

Question 3

Field alias (columnB) and field Product features_Item no: (columnG) are the same. a) Is there a way to "copy" one column to another in the import template so you only have to fill in one column?

Have a look at CSVI field copy plugin. You can create a rule using this copy plugin to copy values from one field to another.

b) Some fields are always the same like access and published. It should always be 1. Is there a way to make an override or something in the template so you don't have to fill them in at all?

You can set default value to these fields in Template fields page. Select your template, click on the field name and on the Default value field set the value you need. Save the field. CSVI will read the default value if set for import. Also note that since you want CSVI to use template fields for import so it can read the default values, in your import template settings on File tab, set Use file for configuration to No. This way CSVI will use template fields for import and not column headers of your import file.
Kind regards,

Tharuna

=========================
If you use our extensions, please post a rating and a review at the Joomla! Extension Directory
  1. more than a month ago
  2. RO CSVI
  3. # 1
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!