A friend had Quickbooks and had entered some bills in one company, and wanted to get them into another company. Intuit didn't seem to have any facility for exporting then importing data like bills. I found documentation for IIF format. There was an example for bills. I found that Quickbooks 2009 would import multiple bills saved in the format. I made an applescript to format bill data saved as excel from an accounts payable register (tab separated text) in the iif format which can then be imported into another company.

__________
here's the part of the format i used:

!VEND	NAME	PRINTAS	ADDR1	ADDR2	ADDR3	ADDR4	ADDR5	VTYPE	CONT1	CONT2	PHONE1	PHONE2	FAXNUM	EMAIL	NOTE	TAXID	LIMIT	TERMS	NOTEPAD	SALUTATION	COMPANYNAME	FIRSTNAME	MIDINIT	LASTNAME
VEND	Office Max																							
!TRNS	TRNSID	TRNSTYPE	DATE	ACCNT	NAME	CLASS	AMOUNT	DOCNUM	MEMO	CLEAR	TOPRINT	ADDR5	DUEDATE	TERMS										
!SPL	SPLID	TRNSTYPE	DATE	ACCNT	NAME	CLASS	AMOUNT	DOCNUM	MEMO	CLEAR	QNTY	REIMBEXP	SERVICEDATE	OTHER2										
!ENDTRNS																								
TRNS		BILL	1/7/08	Accounts Payable	Office Max	class	-1.04			N	N		1/17/08											
SPL		BILL	1/7/08	Office Supplies		class	1.04			N		NOTHING	0/0/0											
ENDTRNS																								

I left out a lot of data which wasn't entered, such as vendor address, etc.
here's the applescript (a similar data formatter could be written in php or visual basic, etc):



(*
assumes this format for excel tab sep data:
Date	No./Ref.	Name	Account	Memo	Amount	C	Balance
*)
set linesToSkip to 2 --number of header lines in excel file
set daysDue to 10
--set theTerms to "Net " & daysDue as string
set theTerms to ""

set theDate to current date
copy theDate to frenchVanilla
set month of frenchVanilla to January
set theDateNums to (text -2 thru -1 of ((year of theDate) as text)) & (text -2 thru -1 of ("0" & (1 + ((theDate - frenchVanilla + 1314864) div 2629728)))) & (text -2 thru -1 of ("0" & theDate's day))
set theAliasName to "QuickBooks" & theDateNums & ".iif" as string
set fileChoice to choose file with prompt "choose the exported excel data file"
set dropFolCon to choose folder with prompt "Choose Destination of exported IIF:"
set dropFolConStr to dropFolCon as string
set destPath to dropFolConStr & theAliasName as string
set myFileReferenceWriteExport to (open for access destPath with write permission)
set eof of myFileReferenceWriteExport to 0
close access myFileReferenceWriteExport

set myFileReference to open for access fileChoice
set excelData to read myFileReference
close access myFileReference
set excelData to my list_proc(excelData, (ASCII character 13), (ASCII character 10))
set excelDataList to my list_proc(excelData, (ASCII character 10), "")

set lineCount to 0
repeat with eachLine in excelDataList
	set lineCount to lineCount + 1
	if (lineCount > linesToSkip) and ((eachLine as string) ≠ "") then
		set billItemList to my list_proc(eachLine, tab, "")
		set theDateString to item 1 of billItemList
		set theNoRef to item 2 of billItemList
		set theName to item 3 of billItemList
		set theAccount to item 4 of billItemList
		set theMemo to item 5 of billItemList
		set theAmount to item 6 of billItemList
		if theAmount contains "\"" then
			--get rid of quotes the excel makes for thousands
			set theamountList to my list_proc(theAmount, "\"", "")
			set theAmount to (theamountList as string)
		end if
		set theC to item 7 of billItemList
		set theBalance to item 8 of billItemList
		
		set theDate to date theDateString
		set theDate to theDate + (86400 * daysDue)
		copy theDate to frenchVanilla
		set month of frenchVanilla to January
		set theDueDate to (1 + ((theDate - frenchVanilla + 1314864) div 2629728)) & "/" & theDate's day & "/" & text -2 thru -1 of ((year of theDate) as string) as string
		
		set theIIF to "!VEND	NAME	PRINTAS	ADDR1	ADDR2	ADDR3	ADDR4	ADDR5	VTYPE	CONT1	CONT2	PHONE1	PHONE2	FAXNUM	EMAIL	NOTE	TAXID	LIMIT	TERMS	NOTEPAD	SALUTATION	COMPANYNAME	FIRSTNAME	MIDINIT	LASTNAME
VEND	" & theName & "																							
!TRNS	TRNSID	TRNSTYPE	DATE	ACCNT	NAME	CLASS	AMOUNT	DOCNUM	MEMO	CLEAR	TOPRINT	ADDR5	DUEDATE	TERMS										
!SPL	SPLID	TRNSTYPE	DATE	ACCNT	NAME	CLASS	AMOUNT	DOCNUM	MEMO	CLEAR	QNTY	REIMBEXP	SERVICEDATE	OTHER2										
!ENDTRNS																								
TRNS		BILL	" & theDateString & "	Accounts Payable	" & theName & "	class	-" & theAmount & "	" & theNoRef & "	" & theMemo & "	N	N		" & theDueDate & "	" & theTerms & "										
SPL		BILL	" & theDateString & "	" & theAccount & "		class	" & theAmount & "	" & theNoRef & "	" & theMemo & "	N		NOTHING	0/0/0											
ENDTRNS																								

"
		set myFileReferenceWriteExport to (open for access destPath with write permission)
		set thePosition to get eof myFileReferenceWriteExport
		write theIIF to myFileReferenceWriteExport starting at (thePosition + 1)
		close access myFileReferenceWriteExport
		
	end if
end repeat
beep
say "done"

on list_proc(searchList, search_string, replace_string)
	set AppleScript's text item delimiters to the search_string
	set searchListlist to every text item of searchList
	set AppleScript's text item delimiters to replace_string
	set searchList to the searchListlist as string
	set AppleScript's text item delimiters to ""
	
	if replace_string = "" then
		return searchListlist
	else
		return searchList
	end if
	
end list_proc



--harvey.nu computer stuff