Passing Data To object in MS-Excel 2003 - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Passing Data To object in MS-Excel 2003

Last post 03-16-2005 02:20 AM by tuna. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 03-09-2005 07:53 PM

    • tuna
    • Not Ranked
    • Joined on 03-09-2005
    • Thailand
    • Posts 3

    Passing Data To object in MS-Excel 2003

    Would you help me about passing data from infopath (office 2003) to optionbutton in MS-Excel 2003?
    Thanks a lot. :)
  • 03-10-2005 12:08 AM In reply to

    Re: Passing Data To object in MS-Excel 2003

    Hi Tuna,
    Can you please give more details? What is the user scenario? What is the option button? Have you tried Export to Excel from InfoPath or using schemas from Excel to load the xml files?
    Patrick
    Patrick Halstead
    Project Manager at Qdabra
  • 03-10-2005 12:43 AM In reply to

    • tuna
    • Not Ranked
    • Joined on 03-09-2005
    • Thailand
    • Posts 3

    Re: Passing Data To object in MS-Excel 2003

    Thanks for your reply. I would like to pass value from Infopath's Optionbutton to OptionButton in MS-Excel's Visual Basic tool.
    And I have another question is I want to send data from repeat table to MS-Excel by inserting new row automatically which I will code jsscript program in submit button. And I have my coding in following,

    function dolink()
    {
    var para1 = XDocument.DOM.selectSingleNode("/my:myFields/my:para1");
    var oExcel = new ActiveXObject("Excel.Application");
    oExcel.Workbooks.Add ("D:\\infopath\\excel1.xls");
    oExcel.Sheets("sheet1").Select;

    // test link data to optionbutton
    oExcel.ActiveSheet.Shapes("OptionButton1").Select; //this line error
    oExcel.Selection.Value = True;

    // test insert new row in MS-EXCEL
    oExcel.Rows("10:10").Select;
    oExcel.Selection.Insert Shift:=xlDown; //this line error
    oExcel.Range("A10").value = para1.text;

    oExcel.Visible = 1;
    }


    If you have the best solution,please tell me.
    Thank you very much. :)
  • 03-16-2005 02:20 AM In reply to

    • tuna
    • Not Ranked
    • Joined on 03-09-2005
    • Thailand
    • Posts 3

    Re: Passing Data To object in MS-Excel 2003

    Hello Patrick,

    I could solve my problem. I'm thanks a lot for your helpness. I will send source code to be knowledge for other people.

    function dolink()
    {
    var para1 = XDocument.DOM.selectSingleNode("/my:myFields/my:para1");
    var oExcel = new ActiveXObject("Excel.Application");

    oExcel.Workbooks.Add ("c:\\temp\\excel1.xls");
    oExcel.Sheets("sheet1").Select;

    //link data to optionbutton
    oExcel.ActiveSheet.OLEObjects("OptionButton1").Object.Value = 1;

    //insert data to row 10
    oExcel.Range("A10").value = para1.text;
    oExcel.Rows(10).Insert;
    oExcel.Range("A10").value = "test insert new row";

    oExcel.Visible = 1;

    }

    Bye *^-^*
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.