Working Excel file with C#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Belsirk
    New Member
    • Apr 2009
    • 1

    #1

    Working Excel file with C#

    Hi, i'm using C# Visual Studio 2008 for made a apps able to take some information from the app and sending them to
    a excel template, i'm using Microsoft.Offic e.Interop.Excel namespace and i don't have problem getting the file
    and putting the info to the rows, but i'm not getting the correct result because all the values are seen like text.

    I have a string[,] SaRet array that capture all the info to write on excel, by example
    SaRet = {Meng1, Ful1, 0, 1, =(2*B2)}
    when i use the method: range.set_Value (System.Reflect ion.Missing.Val ue, saRet) everything i's a text value (Ok, the

    source its a string, so it's logical ) and i was wondering if exist a option for let Excel know how work each cell.

    Another question: It's possible use automation for make a dropdown list for the formulas cell?
    because the real formula it's very long and it's a little rodundant write the formula on C# for each row and the
    pass it to excel (The excel file can be use without the App so, the formula must be there )

    P.d. I'm still practicing my english
Working...