Can you please tell me how to d it.
As of now i have done something like this
I have opened search1.xls template edited it and now want that edited sheet to be opened without saving anywhere in the disk :
private void button1_Click(object sender, EventArgs e)
{
Workbook wb = new Workbook();
FileStream fstream = new FileStream("C:\\search1.xls", FileMode.Open);
//Opening the Excel file through the file stream
wb.Open(fstream);
Worksheet worksheet = wb.Worksheets[0];
worksheet.Cells["B5"].PutValue("a");
worksheet.Cells["B6"].PutValue("b");
worksheet.Cells["B7"].PutValue("c");
worksheet.Cells["A11"].PutValue("d");
worksheet.Cells["A12"].PutValue("e");
//Setting the name of the newly added worksheet
worksheet.Name = "My Worksheet";
//Saving the Excel file
fstream.Close();
//wb.Save("C:\\search2.xls", FileFormatType.Excel2003);
**********FileStream fs = new FileStream("c:\\search3.xls",FileMode.Open);
//Stream s = new stream
****wb.Save(fs, FileFormatType.Excel2003);
*********wb.Open(fs,FileFormat.Excel2003);
//System.Diagnostics.Process.Start("c:\\search3.xls");
string value = worksheet.Cells["B5"].Value.ToString();
MessageBox.Show(value);
}
I think i am stil storing it on the c drive .I dont want it to store anywhere.
I want to know how to open the edited xl sheet on click of button without saving it to disk .I am not sure how to use filestream class can you help me regarding this.
Can you be more precise as i am new to this
Thank You,
Bindu.