Hi,
I am writting and excel through ASPOSE by C sharp. Just want to know that how to open the Excel Application while i am writing data into it.
For example In Interop there is a command which fulfill the above mentioned requirement:
Microsoft.Office.Interop.Excel.Application xlapp = new Microsoft.Office.Interop.Excel.Application();
Microsoft.Office.Interop.Excel.Workbook wb = xlapp.Workbooks.Add(Microsoft.Office.Interop.Excel.XlWBATemplate.xlWBATWorksheet);
xlapp.Visible = true;
Is there is any way to do this through aspose.?
Hi,
Thank you for using Aspose.Cells.
You can achieve this using Aspose.Cells with the following lines of code:
//open a workbook
Workbook workbook = new Workbook(Path to your workbook);
//Save a workbook
workbook.Save(“Output.xls”);
To learn more about Opening Excel files, please visit our documentation section Opening Files.
You can also visit our detaialed documentation section HERE for further knowledge about programming with Aspose.Cells.
Hi,
Moreover, If you need to open MS Excel to view your file, you may try using Process.Start() method in System.Diagnostics namespace:
e.g
workbook.Save(strFilePath);
System.Diagnostics.Process p = System.Diagnostics.Process.Start(
strFilePath );
For your information, Aspose.Cells is a spreadsheet library used to create, manipulate or convert Excel files.
Thank you.