This topic is locked

Mapping for importing

3/29/2010 12:56:58 AM
ASPRunnerPro General questions
M
Mwilson91325 author

I would like to down load different CVS files from different financial institutions

Some CVS files have headers some don't

I would like to import and append them into one table called transactions

It would be nice to press an import and select a pre defined mapping for the different files

Also I wish to identify the source of this file so each transaction would say the source let's say from Chase and another from Wells Fargo
Any suggestions?
I'm assuming a custom button to a form to do the mapping and name and save this mapping

Then another button to import and append to select the pre defined mapping.

J
Jane 4/2/2010

Mark,
To import files without headers modify generated files to append headers to the beginning of CSV.

Open generated Transactions_import.asp file with a text editor and find this line there:

WriteToFile psFilePath, GetRequestForm("file_ImportFileName")



Replace it with this snippet:

tempFile = GetRequestForm("file_ImportFileName")

if UCase(Right(psFilePath,4))=".CSV" then

tempFile = "Type,Date,Payee,Amount" & vbrclf & tempFile

end if

WriteToFile psFilePath, tempFile
M
Mwilson91325 author 4/4/2010

Thanks Jane
So for diffrent imports i should use your sample code and diffrent view for each diffrent import?