Results 1 to 2 of 2

Thread: Copy into Excel textbox. Not working. Via C#.net?

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2007
    Posts
    1

    Copy into Excel textbox. Not working. Via C#.net?

    This problem is solved in VB.net,in these forum but i am using C#,i searched and asked in different forums but couldn't find the solution.
    [LIST=1]
    Can any one help me with this in C#.


    1) I am trying to copy a string which has length greater than 255 characters in to a ExcelTextBOx.But it not working if i send 255 characters it working fine.
    my code is like this
    string temp;
    Microsoft.Office.Interop.Excel.TextBox txtbox1=(Microsoft.Office.Interop.Excel.TextBox)workbook.TextBoxes("TxtboxName");
    txtbox1.text=temp;
    txtboxname is the name of the textbox on excel

    2)I have one more question string in temp is from a Label on my webpage.It Has some text bolded .How to preserve the format on ExcelTextBox .

    3)In the above code textbox1 is the name of the textbox on excel cell[1,1] but i have lot of textboxes on excel i cannot give names by myself,so my question is
    How to find out the name of the textbox on a Excel cell from C# using
    Microsoft.interop.office.excel libraries.




    Please somebody help me with these i am trying for answers since so long.

    Thanks
    KU

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Copy into Excel textbox. Not working. Via C#.net?

    Moved from Visual Basic.NET

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width