Extract data on specific rows in Excel file and add it to different word document on specific rows

I was wondering about if it's possible to set up some kind of vba for this function. I have one worksheet with different data in. Where it is written the same thing like 1A & 2A And 1B & 2B
And if i could put this information on specific rows in a Word document.
I would like to have all of the different data on row 1 in one specific row in a word sheet for it self and the different data on on row 2 copied into different rows in a new word document if it's possible to do some kind of domino effect of this where it can
run 5000 diffrent rows with this kind of inputs,
Im sorry for the bad explanation i did not really know how to translate it as good as possible, write back if you have any question!
Cell 1A: Bmw Cell 1B: Automatic Cell 1C: Diesel Cell 1D: 2014
Cell 2A: Volvo Cell 2B: Manual Cell 2C: Bensin Cell 2D: 2010

Run this code in Excel.
Sub PushToWord()
Dim objWord As New Word.Application
Dim doc As Word.Document
Dim bkmk As Word.Bookmark
sWdFileName = Application.GetOpenFilename(, , , , False)
Set doc = objWord.Documents.Open(sWdFileName)
objWord.activedocument.variables("BrokerFirstName").Value = Range("BrokerFirstName").Value
objWord.activedocument.variables("BrokerLastName").Value = Range("BrokerLastName").Value
ActiveDocument.Fields.Update
objWord.Visible = True
End Sub
You must add a few DocVariables to your Word document.  See these links for more information.
http://word.tips.net/T000813_Understanding_Document_Variables.html
https://www.youtube.com/watch?v=aABYENF1bMI
Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

Similar Messages

  • How can I copy a table from a web file and paste it into a word document on a pc?

    I am having diffculty getting a pdf file from a web document pasted into my word document.  I do no get the option to copy or save as a table.  I can copy and paste the text but I lose the table and the format and just get the text.  Anybody know what I can do to solve this?

    Try holding down the alt key as you mark the text to be copied. You can then copy columns to table text.

  • How can i extract data from oracle table  to flat file or excel spread shee

    Hello,
    DB Version is 10.1.0.3.0
    How can i extract data from oracle table to flat file or excel spread sheet by using sub programs?
    Regards,
    D

    Here what I did
    SET NEWPAGE 0
    SET SPACE 0
    SET LINESIZE 80
    SET PAGESIZE 0
    SET ECHO OFF
    SET FEEDBACK OFF
    SET VERIFY OFF
    SET HEADING OFF
    SET MARKUP HTML OFF SPOOL OFF
    Sql> SPOOL bing
    select * from -------;
    SPOOL OFF;
    I do not see file.
    I also tried
    Sql> SPOOL /tmp/bing
    select * from -------;
    SPOOL OFF;
    But still not seeing the fie,

  • Exporting Data Quality Statistics Into An Excel File Or Database

    Hi,
               I would like to ask if it is possible to export the data profiling statistics into an excel file / flat file or a database table.
               The output required by our development team is that we would like to be able to manipulate and review the data profiling outside of the Data Quality Services User Interface.
              I'm aware that after the cleansing of a specific set of data is that you can save/export the output results into an excel file or database, however the feature I'm looking for is for the data profiling statistics itself.
     Mostly information on the knowledge base.  Specifically, how many new records this specific column has and how many unique data and invalid data this column has and etc.
              The reason for this is that so we can control and track the data profiling information and be a bit more flexible in creating reports and presenting the data.  Using the DQS user interface would not suit our needs
    for the project.   
               Sorry if this has been asked before but i've tried searching around and couldn't find any information regarding this functionality.
    Thanks!

    I'm not too sure where they are stored, but you could use the directories shown in transaction AL11 so find them.

  • Writing to specific cells of existing Excel file and saving as a new file using LV 8.6

    Hi all,
    I am new to LV and am currently tasked to create a program that can open an existing excel file, input data in the program that will be written to a specific cell in the excel file and then saving the current edited file as a new file.
    I have browsed through all the forums but I am unable to view the examples sent in them as I am using LV 8.6 which is why I am still having trouble visualizing how to create a program like this. Can anyone help me and mentor me how to write this program in this version of LV? I do not have a microsoft office toolkit hence another approach could be preferred. Thank you.
    Aaron
    Solved!
    Go to Solution.

    Thank you for helping me on this. However I do not really understand how does ActiveEx work. I have created a Vi according to the picture that you provided but there was some error in running the file.
    Below is my own VI that I am trying to create. It consists of multiple string inputs which I am trying to input each into an existing file. I have created a separate txt file which has the cell numbers. I am trying to allocate each string into each respective cell in an existing file. I am currently having the problem of doing this "allocation" of each string as I do not have the microsoft office tool kit. Is there any other way for me to do so?
    Also, I would like to save the newly created file as a new file with the name as seen in my VI. How would I be able to do it?
    Please help me as I am stuck here but do not know how to continue
    Attachments:
    untitled.JPG ‏33 KB

  • Uploading Excel File and Reading Data from that File

    <b>Hi
    Can anyone Please tell me how to upload an Excel File in to the Web Dynpro Application and After that i want to read the data from that uploaded excel file in the Web Dynpro Application to the Web Dynpro table.
    Plz help me to solve this.......
    Regards
    Chandran</b>

    Hi,
    Upload Excel file using File Upload UI
    1)Add jxl jar folder in the lib folder of ur project.
    2)Go to properties of ur project and add jar to ur project.
    3)Using the File upload ui ,browse and upload the file.
    4)Write the read file in to ur server location using fileoutput stream.
    5)then using code u can read the excelfile from the server location itself.
    Here is the code:
         IWDAttributeInfo attInfo =wdContext.getNodeInfo().getAttribute("upload");
    /** get the name of excel file and storing it in the server with the same name and extention****/
    binaryType=IWDModifiableBinaryTypeattInfo.getModifiableSimpleType();
    fileuploaded = binaryType.getFileName();
    byte b[] = wdContext.currentContextElement().getUpload();
    File filename =new File("
    <Server name>
    <folde name>
    " + fileuploaded);
    try {
    FileOutputStream out = new FileOutputStream(filename);
    out.write(b);
    out.close();
    } catch (FileNotFoundException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    /**Readind from the server**/
    int iRows = 0;
    try {     Workbook wb = null;
         Sheet sheet = null;
         wb = Workbook.getWorkbook(filename);
         sheet = wb.getSheet(0);
         int iColumns = sheet.getColumns();
          iRows = sheet.getRows();
         int i = 0;
        //get Cell contents by (COLUMN, ROW);
        for (int r = 0; r < iRows; r++) {
       for (int c = 0; c < iColumns; c++) {
         Cell cell = sheet.getCell(c, r);
         characterarray<i> = cell.getContents();
    //wdComponentAPI.getMessageManager().reportSuccess("Row"r characterarray<i>);
    i++;
    wb.close();
    Declare Globally
    //@@begin others
    String fileuploaded;
    IWDModifiableBinaryType binaryType;
    String characterarray[] = new String[1000];
    //@@end
    Also look at this blog too  /people/perumal.kanthan/blog/2005/03/21/reading-excel-data-from-java-using-hssf-api
    Thanks and Regards,
    Arun

  • Extracting data from Oracle to a flat file

    I'm looking for options to extract data a table or view at a time to a text file. Short of writing the SQL to do it, are there any other ideas? I'm dealing with large volumes of data, and would like a bulk copy routine.
    Thanks in advance for your help.

    Is there any script which i can use for pulling data from tables to a flat file and then import that data to other DB'sFlat file is adequate only from VARCHAR2, NUMBER, & DATA datatypes.
    Other datatypes present a challenge within text file.
    A more robust solution is to use export/import to move data between Oracle DBs.

  • How to read the data from Excel file and Store in XML file using java

    Hi All,
    I got a problem with Excel file.
    My problem is how to read the data from Excel file and Store in XML file using java excel api.
    For getting the data from Excel file what are all the steps i need to follow to get the correct result.
    Any body can send me the code (with java code ,Excel sheet) to this mail id : [email protected]
    Thanks & Regards,
    Sreenu,
    [email protected],
    india,

    If you want someone to do your work, please have the courtesy to provide payment.
    http://www.rentacoder.com

  • How to retrieve data from a read-only Excel file

    Hi Developers,
    I'm trying to retrieve data from a read-only Excel file. I used the same code that I used to retrieve data from a normal Excel file, but it can't work.
    My code is as followed:
    try
    InputStream KpExcel = new FileInputStream("kp.xls");
    HSSFWorkbook Kpwb = new HSSFWorkbook(KpExcel);
    HSSFSheet Kpsheet = Kpwb.getSheetAt(0);
    catch(Exception e)
    e.printStackTrace();
    System.out.println("Exception: "+e.getMessage());
    The error I received is as followed:
    java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
    at org.apache.poi.hssf.record.RecordFactory.createRecord(RecordFactory.java:224)
    at org.apache.poi.hssf.record.RecordFactory.createRecords(RecordFactory.java:160)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:163)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:210)
    at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:191)
    at photoproductionsystem.IncomingWIPPanel.getKp(IncomingWIPPanel.java:118)
    at photoproductionsystem.IncomingWIPPanel.<init>(IncomingWIPPanel.java:76)
    at photoproductionsystem.TabbedDisplay.<init>(TabbedDisplay.java:47)
    at photoproductionsystem.Display.create(Display.java:73)
    at photoproductionsystem.Display.init(Display.java:44)
    at photoproductionsystem.Display.main(Display.java:229)
    Caused by: java.lang.ArrayIndexOutOfBoundsException
    at java.lang.System.arraycopy(Native Method)
    at org.apache.poi.hssf.record.UnknownRecord.<init>(UnknownRecord.java:62)
    at org.apache.poi.hssf.record.SubRecord.createSubRecord(SubRecord.java:57)
    at org.apache.poi.hssf.record.ObjRecord.fillFields(ObjRecord.java:99)
    at org.apache.poi.hssf.record.Record.fillFields(Record.java:90)
    at org.apache.poi.hssf.record.Record.<init>(Record.java:55)
    at org.apache.poi.hssf.record.ObjRecord.<init>(ObjRecord.java:61)
    ... 15 more
    Can someone please help me with my problem? Thanks a lot in advance!

    Madeline wrote:
    how do I ask at Apache mailing list?I wonder why it seems to be a strange idea to some people to look at the software vendor's site for product support. :p
    http://poi.apache.org/mailinglists.html

  • FM to get Data from Sheet of an excel file to Internal table??

    Hello Champs!!!
    I have a problem in Excel File's Data Getting.
    There are diffrent Sheets in a single Excel file. I need data of a perticular sheet into an internal Table.
    Like there are 2 Sheets in an Excel file EXCEL1, Sheet1 & Sheet2. Both Sheet have diffrent Data in it.
    Now i only need Data of Sheet1 of this Excel FIle Excel1.
    How can i get it?
    Can you please help me in this?
    Thanks in Advance!!!!
    Girija Shankar

    Welcome to SCN
    Please search before you post next time:BDC, upload data from multi excel sheets

  • Upload data from multiple worksheets of excel file into SAP by using MIME?

    Hi all,
    I'm trying to getting the data from a multiple worksheet excel file by usin the MIME Repository.
    First of all i realizied it like [here|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in a normal ABAP Report.
    By trying to transfer the code to a WebDynpro Component, i get problems.
    With this part of code, because ActiveX is not allowed in our Webbrowser. So i have to find another solution to get the data from the excel file.
    CALL METHOD c_oi_container_control_creator=>get_container_control
    IMPORTING
    control = iref_control
    error   = iref_error
    I tried to rebuild this solution in webdynpro. But it dont works.
    So my next step was trying to Read the Excel sheet directly from MIME by getting the Content (XString).
    But there is no useful information Just a mix out of '######' and other symbols.
    By converting it into String the same problem.
    Maybe someone has an idea how to rebuild [this code|http://abap-explorer.blogspot.com/2008/12/upload-data-from-multiple-worksheets-of.html] in Webdynpro that it works correctly.
    Currently Im Using the Fileupload UI Element. All Works fine. I can Upload the Excel file to MIME Repository and i can open it from there.
    But i cant get the same clear informationen from the file, to write it later in a Database, like before without webdynpro.
    i hope someone can help me.
    Edited by: Sascha Baumann on Apr 20, 2009 4:28 PM

    You can't read the native binary Excel Format in server side ABAP.  The functions and classes that did this in Classic Dynpro used OLE Automation via the SAPGUI Control Framework to remotely control Excel to read the data.  Because in the browser you have no connection to the SAPGUI or are sandboxed inside the browser; the same functionality is not possible. 
    I would suggest that you look into saving the Excel file as a open, text format.  You might be able to use XML (although the Excel XML format can be complex) to support multiple sheets. You would have to build the logic yourself (using XSLT or the iXML parser) to process the XML format back into ABAP data.

  • BO Data Services - Reading from excel file and writing to SQL Server Table

    Hi,
    I would like to read data from an excel file and write it to a SQL Server Data base table without making any transformations using Data Services. I have created an excel file format as source and created target table in SQL Server. The data flow will just have source and target. I am not sure how to map the columns between source and target. Appreciate your quick help in providing a detailed steps of mapping.
    Regards,
    Ramesh

    Ramesh,
    were you able to get this to work? if not, let me know and I can help you out with it.
    Lynne

  • How to Transfer SAP data to perticular Worksheet in Excel file

    Hi,
    I have a requirenment to Transfer SAP data to Perticular WorkSheet in an Existing Excel file, i tries using EXCEL_OLE_STANDARD_DAT but this FM deletes all Existing worksheets in the Excel file and creates only one new worksheet and adds data to it.
    Please Help me to solve this issue.....
    Thanks
    Srilatha

    hello,
    what kinf of data do you need to transfer?
    master data
    or
    payroll results?
    regards
    stefan

  • Numbers 2.1 when exported as an excel file and my application tries opening it, it says file contains corrupt data.

    I recently updated my iPad to the latest iOS 7 and updated my numbers app to 2.1. When i export it to a excel file and then when my C# application(using gembox library) tries reading it, i would get an error "file contains corrupt data". before making the update to iOS 7 and before updating my numbers the process worked fine!

    That didn't work for me and the page times out right about 5
    minutes (300 seconds). I don't have timeout checked in the CF
    Administrator so I don't think it is CF that is causing the
    timeout. I checked IIS also and the timeout is set to 900 seconds.
    Is there a possibility that SQL Server has some sort of
    connection limit and I'm using too many cfquery tags? If anyone has
    experienced a similar problem I would really appreciate the help,
    thanks.

  • How to open an Excel file and write data into it.

    Hi All,
    I have an excel template, which has graphs and some tables containing corresponding data. If i change the data in tables it changes the graphs. So, if i have a template in the server, is it possible for me to open this excel file and change the data in the tables to chanage the graphs. How can i go to different worksheets and go to different cells and change the values and save the file.
    Thanx in advance
    Cheers
    Pej

    You can setup an ODBC connection to the Excel file and update the file with JDBC, using the JDBC-ODBC bridge.
    Hope this helps

Maybe you are looking for

  • No Pre-commitment at PR creation time in ECC -issue at PO creation in SRM

    Hi all, We are on SRM 5.0 Extendec CLassic with ECC 6.0 I have a couple of questions wrt budget check and commitment creation in SRM. 1.When a PRis transferred from ECC to SRM,is the budget check possible?If yes,what are the settings in ECC/SRM? 2. A

  • Temporary solution to play flv files on nokia n8 h...

    Solution for playing flv video files from nokia N8 Following are the steps 1) Open the file 2) Quickly tap the screen, and move the volume key up and down 3) again tap the screen and that's all, now enjoy the video as you did prior to belle . note: t

  • How do I improve Repousse quality?

    I'm having difficulty using the repousse technique to create 3D text.  When I do it, it results in aweful jagged lettering.  Is there a setting to fix this?  I'm new to PhotoShop, I work primarily on Premiere Pro and After Effects. Thanks

  • Query regarding datafile resize

    Hi all, Just want to know in my testing server for reporting purpose for each month can i add new datafile to increase the space or resize the exsiting datafile becoz i am trying to maintain month wise tables in a single tablespace. Which is benefici

  • IPad stopped printing to my AirPlay printer

    IiPad suddenly says can't find AirPlay printer. No changes made to wifi network or epson 305 printer. Iphone still find printer and prints.no other iPad faults. Suspect ios8.2 glitch but can't see how to reinstall it