Results 1 to 2 of 2

Thread: Auto Create CSV from a xlsx Template... possible??

  1. #1

    Auto Create CSV from a xlsx Template... possible??



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi

    I'm looking to populate the data of an existing .csv file from a .xlsx file

    The simple procedure of saving as .csv isn't adequate. I'm looking to populate an online database with specific information of some 10'000 products so it's a large data input task. I have created a Template in excel which makes it very quick, easy and simple to use for people with limited PC knowledge. Obviously the headers needed for the CSV files are not ones most would recognise. I can save as CSV and it uploads perfectly but that's a manual process which I can't trust staff to carry out.

    Is there some way of linking the CSV file to the xlsx file? I'm assuming that wouldn't work as a CSV file will not retain the relevant code that points it to the XLSX file??

    Can something be set-up that when you save the XLSX it automatically saves as .CSV as well?

    Your help would be appriciated.

    James

  2. #2
    Super Moderator JeffreyWeir's Avatar
    Join Date
    Mar 2011
    Location
    New Zealand
    Posts
    357
    Articles
    0
    Yes, you can save as CSV file and then resave in the original Excel file format you had.

    Something like this:
    wbkDest.SaveAs Filename:=strFilePath & "SomeFileName.csv", FileFormat:=xlCSV, CreateBackup:=False
    wbkDest.SaveAs Filename:=strWorkbookName, FileFormat:=52, CreateBackup:=False

    Will you need to prompt the user for a directory where to save the file? Or will that be hard-coded?

    More info in this at http://www.rondebruin.nl/saveas.htm

Posting Permissions

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