Code:
Excel.Application xlApp = new Excel.Application();
Excel.Workbook xlWB;
Excel.Worksheet xlWS;
Excel.Range xlRng;
string workbookPath = "C:\\Documents and Settings\\adavis\\My Documents\\Area51\\T-Numbers Data";
private void addTNumberBtn_Click(object sender, EventArgs e)
{
xlApp.Workbooks.Open(workbookPath, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value, Missing.Value);
int colIndex = 0;
string addTNumbers = addTNumberTextBox.Text;
xlWS.Cells[1, 1] = addTNumbers;
//Save the file to where you specified
xlWB.Save();
xlApp.Visible = true;
}
That's what I have right now. I know how to create an excel app, but I'm having trouble with the textbox it appears. It was kind of working, but now how I want it. Now i'm getting an error about instances.
Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum