PDA

View Full Version : Data mapping from one excel workbook to another excel workbook



ramserp
04-22-2010, 07:53 AM
Hi Friends,

I need to map data from one excel workbook to another excel workbook. I need to open the source workbook then need to create new workbook and some cells of data needs to be maped from source workbook to newly created workbook.

Source workbook has one sheet (Source)

newly created workbook also contains one work sheet (Dform)

Some cells of source sheet data needs to be mapped into Dform sheet.

The following is the Algorithm

Private Sub CommandButton1_Click()

GetSourceDirectory
Getsourceworkbook
Getsource worksheet

For i = 0 To NoOfDocs

Read source sheet
Getcells
DumpIntoTraget
Next
End Sub

All the cells under source sheet column from following table needs to be mapped to the cells under Dform sheet.

for example : sheets("Dform").range("AP11").value=sheets("source").range("b13").value


Source SheetDform SheetB3čEY11B12čB11B13čAP11B14čAQ11B15čAR11B16čFG11B17čAS11B18čG7B19čBQ11B2 0čB7B21čC7B22čD7B23čE7B24čF7B25čAJ11B26čAK11B27čAL11B28čAM11B29čAN11B30čBH1 1B31čBJ11B32čBL11B33čBN11B34čB35čBO11B36čCC11B37čCD11B38čCF11B40čC11B41čD11 B42čBE11B43čBF11B44čBG11B45čE11B46čBB11B47čBC11B48čBD11B49čF11B50čAU11B51čA V11B52čAW11B53čAX11B54čAY11B55čAZ11B56čDU11B57čDZ11B58čEC11B59čDV11B60čDX11 B61čDW11B62čDY11B63čEK11B64čER11B65čBZ11B66čCA11B67čAH11B68čFB11B69čEO11B70 čEP11B71čEN11B72čED11B73čEE11B74čEH11B75čEF11B76čEG11B77čB9B78čC9B79čD9B80č E9B81čEL11B82čEX11B83čFC11B84čB2B85čC2B86čD2B87čES11B88čET11B89čEU11B90čEV1 1B91čEW11B92čB6B93čC6B94čD6B95čE6B96čB5B97čC5B98čD5B99čE5B100čF5B101čG11B10 2čH11B103čI11B104čL11B105čJ11B106čK11B107čB108čCB11B109čM11B110čQ11B111čU11 B112čY11B113čFD11B114čFF11B115čC1B116čB3B117čC3B118čD3B119čE1B120čB1B121čC1 B122čD1B123čE1B124čB12B125čC12B126čD12B127čE12B128čF12B129čG12B130čH12B131č I12B132čJ12B133čK12B134čL12

I need to map nearly 2000 source files into Dform files. Please kindly provide the macro or logic to complete this task.

Thanks & Regards
Ramesh