|140974||Nov 16,2018 01:38 PM UTC||Nov 19,2018 06:51 AM UTC||Xamarin.Forms||2|
//Create an instance of ExcelEngine.
using (ExcelEngine excelEngine = new ExcelEngine())
//Set the default application version as Excel 2013.
excelEngine.Excel.DefaultVersion = ExcelVersion.Excel2013;
string myurl = "http://emtmsdevt.devtpit.com/DocumentLibrary/TopicFiles/ImportStaff19.xlsx"; //this is my excel file.which is come from DB. i need to open
var webClient = new WebClient();
byte file = webClient.DownloadData(myurl);
Stream fileStream = new MemoryStream(file);
//Create a workbook with a worksheet
IWorkbook workbook = excelEngine.Excel.Workbooks.Open(fileStream);
//Access first worksheet from the workbook instance.
IWorksheet worksheet = workbook.Worksheets;
//Adding text to a cell
worksheet.Range["A1"].Text = "Hello World";
//Save the workbook to stream in xlsx format.
MemoryStream stream = new MemoryStream();
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.