[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 that reads a CSV / Excel file & generates insert statements. There are two ways to Import data to QuickBooks through CSV using QODBC. 1) Using WizardCreate a new MS Access Database file & link the Customer table. Please refer to Using QuickBooks Data with Access 2016 / 365 / 2013 32-bit for lining the 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 the second option. Append the copy of the records to the table.
Next, select the option "Delimited - Characters such as comma or tab separate each field," 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 to configure import fields.
Now write the field name you want to insert from the CSV file & click OK.
Click Finish to complete the import process.
Import Done. Customer data from CSV is inserted into the QuickBooks customer table.
Or 2) Using VBA CodePlease refer to Using QuickBooks Data with VBA In this tutorial, we are showing a sample VBA script inserting Customer & Invoice. Importing Customer to QuickBooks through CSV file using QODBC & Microsoft Access VBAWe have a Customer CSV file with Customer Name, CompanyName, Phone & Email fields. We will import these fields to QuickBooks using VBA. You can see the below records from the Customer CSV file.
Please refer to the sample VBA code for Importing Customers to QuickBooks through CSV file using QODBC. By clicking on the "Add Customer" button, the Customer list in a CSV file will be imported into QuickBooks using QODBC.
Please Note: You need to change the 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 a 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 an Invoice CSV file with CustomerRefListID, RefNumber, InvoiceLineItemRefListID, InvoiceLineDesc, InvoiceLineRate, InvoiceLineQuantity, InvoiceLineSalesTaxCodeRefListID & FQSaveToCache fields. In this example, we are creating two Invoices, each having 3 InvoiceLine. We will import these fields into QuickBooks using VBA. You can see the below records from the Invoice CSV file.
Please refer to the sample VBA code for Importing Invoices to QuickBooks through CSV file using QODBC. By clicking the "Add Invoice" button, the Invoice list in a CSV file will be imported into QuickBooks using QODBC.
Please Note: You need to change the 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 a 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: | |
|