Author Topic: Adding Excel File Upload option to product_csv module  (Read 301439 times)

Anthony

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv
« Reply #15 on: May 24, 2007, 05:04:11 am »
Ok... what am I doing wrong here? I get this any time i try to upload the xls file.

Warning: Invalid argument supplied for foreach() in /home/bdesigns/public_html/blainedistribution/store/administrator/components/com_virtuemart/html/product.mycsv.php on line 105

I've tried saving in 97-2003 workbook XLS format, 5.0 /95, and the XLSX format.

I get a similar error with CSV files as well:

Warning: Invalid argument supplied for foreach() in /home/bdesigns/public_html/blainedistribution/store/administrator/components/com_virtuemart/classes/ps_csv.php on line 2194

Line 1: Product SKU not specified
Line 2: Product SKU not specified
Line 3: Product SKU not specified

The funny thing with the CSV format is that it "previews" just fine... just wont upload correctly after previewing it.

Help?! :-)

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #16 on: May 24, 2007, 05:25:24 am »
It may help if you can supply some sample excel file.
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

Anthony

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv module
« Reply #17 on: May 25, 2007, 00:53:54 am »
Forgive me... but how would you like the sample excel file? Copy and pasted from Excel or notepad? there is no way to upload the XLS file here.

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #18 on: May 25, 2007, 01:13:17 am »
You can put your file in a public accessible place and place a link here.
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

Anthony

  • Beginner
  • *
  • Posts: 5
Re: Adding Excel File Upload option to product_csv
« Reply #19 on: May 25, 2007, 01:22:49 am »

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #20 on: May 25, 2007, 09:11:33 am »
Anthony,
I have no problem uploading your file. You may try uploading your file with the excel hack uninstalled. If you still have the same problem, then it has nothing to do with the hack.

Please check the version of Joomla and Virtuemart you are using. The hack is supposed to work with the latest version though probably it will work with previous versions.

Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

lkow77

  • Beginner
  • *
  • Posts: 12
Re: Adding Excel File Upload option to product_csv module
« Reply #21 on: May 25, 2007, 22:10:43 pm »
Hi All  :-)

I have a problem with upload... i have this command:

Incorrect column count
Configration: 14 fields
File: 30 fields

CSV File Imported
--------------------------------------------------------------------------------
Version: 0.7
Using delimiter:
Using enclosure:
Skipping the first line
Not skipping default value
Overwriting data
Do not use column headers for configuration
Not using preview
Doing a normal upload
Use database for configuration
Publish products field is used

I have file.xls with 30 columns (not all are with data) so, what is wrong??
In configuration I have 30 rows and 14 or 15 are marked as fields required... when I add file with 14 columns with data I have (fools? stupid data?) in my list of products..

sorry for my bad english,

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #22 on: May 25, 2007, 22:20:46 pm »
First you have to make sure all the fields you specified are allowed. Then either
1. Specify the columns in the configuration tab in the order of the fields in the file or
2. Add the vm fieldnames to the first line of your excel file (if have some other header there, you have to replace the header). Then in the upload choose use column headers for configuration.

Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

lkow77

  • Beginner
  • *
  • Posts: 12
Re: Adding Excel File Upload option to product_csv module
« Reply #23 on: June 02, 2007, 22:13:07 pm »
Thanks for your help. I used second idea and have a problem with:
1/desc (not short but long) I C only first letter of my long desc,
2/ date start and date end discount, vm doesnt show it,
3/price - it must be net, but i want to paste to xls with tax :-)

I think that 1/ bug is, because I use other language and i dont know how to change coding in xls,
but 2/ and 3/ I haven't idea
sorry for my bad English,
I wish that U understand what do I mean,

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #24 on: June 03, 2007, 08:36:06 am »
Can you send me your xls file?
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

lkow77

  • Beginner
  • *
  • Posts: 12
Re: Adding Excel File Upload option to product_csv module
« Reply #25 on: June 03, 2007, 20:39:08 pm »
yes ;-)

here u r

[attachment cleanup by admin]

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #26 on: June 04, 2007, 01:07:22 am »
For your question no. 1, I can see all the text after upload. I think you must have your database set to the correct encoding before you can show international characters. I recommend using utf-8.
Question no. 2 relates to display problem. You may be able to show that by customizing the flypage.php template.
I'm not too sure about your problem 3. You can always convert the before tax and after tax price using excel before upload. That shouldn't be a big problem.
Hope this helps.
Joseph
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.

lkow77

  • Beginner
  • *
  • Posts: 12
Re: Adding Excel File Upload option to product_csv module
« Reply #27 on: June 04, 2007, 01:17:32 am »
sorry,
problem nr 2/
 in vm' admin in dicount list I C only for eg. 5% but without date start and end, can't convert it to discount list..

Now I have utf-8 I check it.

juicyfruit

  • Beginner
  • *
  • Posts: 37
Re: Adding Excel File Upload option to product_csv module
« Reply #28 on: June 11, 2007, 08:52:27 am »
Hi Joseph,

 Thanks for the component.

 question:
Can the component be used to export data?

Normally, I export data from the database before modifying the details and then import it back to the database.

cheers
Eddie

Joseph Kwan

  • Advanced
  • Full Member
  • *****
  • Posts: 2344
Re: Adding Excel File Upload option to product_csv module
« Reply #29 on: June 11, 2007, 08:59:35 am »
No, the mod cannot write directly to xls files. However, csv export can be read by excel, so you can just use the csv export module to export data. Modify it and then import using xls.

Joseph

Update: latest version already support xls download. The file downloaded is in fact an xml file but can be read directly by Excel.
Joomla/VM Upgrade Services. Problems with your migration? We can help.
Custom extensions to VM. Performance Tuning. Template modifications and advices.
Pay service to make VM work according to your needs. Your Joomla/VM solutions are just a PM away.