[QODBC-ALL] How to Import data to QuickBooks through CSV using QODBC
Posted by Jack - QODBC Support on 30 March 2016 09:57 AM
|
|
How to Import data to QuickBooks through CSV using QODBCNote: QODBC does not support direct import, But you can write VBA code which reads a CSV / Excel file & generates insert statements. There are two ways to Import data to QuickBooks through CSV using QODBC 1) Using WizardCreate new MS Access Database file & link Customer table. Please refer Using QuickBooks Data with Access 2016 / 365 / 2013 32-bit for lining Customer table. Go to the "External Data" tab on Microsoft Access, as shown in the screenshot below and click on the "Text File". The "Get External Data", screenshot will be shown below. Select the CSV file by clicking the "Browse" button. (*Note: the file name must be less than 64 characters otherwise Microsoft Access will not be able to import it). Choose second option Append the copy of the records to the table. Next, make sure the option "Delimited - Characters such as comma or tab separate each field" is selected as shown in the screenshot below and click "Next". Next, make sure "Comma" is selected in the "Choose the delimiter that separates your fields" and the double quotes symbol " is selected in the "Text Qualifier" as shown in the screenshot below and click "Next" to continue. Now click on the Advanced button for configure import fields. Now write field name which you want to insert from CSV file & click OK. Click Finish to complete the import process. Import Done. Customer data from CSV is inserted into QuickBooks customer table. Or 2) Using VBA CodePlease refer Using QuickBooks Data with VBA In this tutorial, we are showing sample VBA script which is inserting Customer & Invoice. Importing Customer to QuickBooks through CSV file using QODBC & Microsoft Access VBAWe have Customer CSV file which has Customer Name, CompanyName, Phone & Email fields. We will import these fields to QuickBooks using VBA. You can see below records from Customer CSV file.
Please refer below sample VBA code for Importing Customer to QuickBooks through CSV file using QODBC. By clicking on "Add Customer" button, Customer list in CSV file will be Imported into QuickBooks using QODBC.
Please Note: You need to change CSV file location & VBA script according to your CSV file location & file data. Please refer below code which is used in this example:
Option Compare Database '' For 64-bit use this one-->sConnectString = "DSN=QuickBooks Data 64-bit QRemote;" sSQL = "SELECT * FROM customer" Please Note: If you have 64-bit application, then you need to use QRemote 64-bit DSN "QuickBooks Data 64-bit QRemote" (i.e. sConnectString = "DSN=QuickBooks Data 64-bit QRemote;OLE DB Services=-2;") Importing Invoice to QuickBooks through CSV file using QODBC & Microsoft Access VBAWe have Invoice CSV file which have CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineQuantity, InvoiceLineSalesTaxCodeRefListID & FQSaveToCache fields. We will import these fields into QuickBooks using VBA. In this example, we are creating two Invoices each having 3 InvoiceLine. You can see below records from Invoice CSV file. Please refer below sample VBA code for Importing Invoice to QuickBooks through CSV file using QODBC. By clicking on "Add Invoice" button, Invoice list in CSV file will be Imported into QuickBooks using QODBC.
Please Note: You need to change CSV file location & VBA script according to your CSV file location & file data. Please refer below code which is used in this example:
Option Compare Database '' For 64-bit use this one-->sConnectString = "DSN=QuickBooks Data 64-bit QRemote;" sSQL = "SELECT * FROM InvoiceLine" Please Note: If you have 64-bit application, then you need to use QRemote 64-bit DSN "QuickBooks Data 64-bit QRemote" (i.e. sConnectString = "DSN=QuickBooks Data 64-bit QRemote;OLE DB Services=-2;") Also, Refer: | |
|