Click here to Skip to main content
15,902,189 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello everybody. I m trying to fill excel file from c# more than one month
I know here is experienced people who can give me some useful advices.
So... There is .xls international Form in it is lots of columns rows and texts. I want to program c# app which can insert values in current place. for example insert 239 USD in 27, K (this is a address of excel forms cell)
Does it possible?
What is your advice?
If it easier way to use html or something another?
i need step by step tutorials or book or something
It is very very important for me
Thanks
Posted

1 solution

hello ; for using C# winform , you can check that link where you can fill any cell in excel sheet or fill a worksheet from blank ...
link1[^]

and here is a base code for assinging a range in excel sheet :

object optional = Missing.Value;
object updateLinks = 0;
Microsoft.Office.Interop.Excel._Workbook wkb = app.Workbooks.Open
(fullname, updateLinks, optional, optional, optional, optional,
optional, optional, optional, optional, optional, optional, optional,
optional, optional);
Microsoft.Office.Interop.Excel._Worksheet wks =
(_Worksheet)wkb.Worksheets.get_Item(MySheet.Text);
wks.Activate();
wks.Visible = XlSheetVisibility.xlSheetVisible;
Range wksRange;
wksRange = wks.get_Range("H7", "H7");
wksRange.set_Value(Missing.Value, workingDate);
app.Calculate();
wkb.Save();
wkb.Close(false,Missing.Value,false);
app.Quit();


it depends on how much is your excel sheet is complicated...
any way hope that will help you...
regards...

hope that will help you
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900