We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Open file xls from asset

Thread ID:

Created:

Updated:

Platform:

Replies:

127931 Dec 20,2016 02:24 AM Dec 21,2016 07:05 AM UWP 2
loading
Tags: XlsIO
PINEAU
Asked On December 20, 2016 02:24 AM

Hi,

Is there a possibility to open an Excel file directly from Asset folder with XlslOS on a UWP platform  and this code ?

//Create an instance of ExcelEngine. using (ExcelEngine excelEngine = new ExcelEngine())
{             
//Open an existing workbook. IWorkbook workbook = excelEngine.Excel.Workbooks.Open(@"ms-appx:///Assets/Calendrier2017.xls");

//Access the first worksheet from the workbook instance. IWorksheet worksheet = workbook.Worksheets[0];

//Read/access the value of the cell (B3) textBox1.Text = worksheet["B3"].Text;
}

Thank you for your help

PINEAU
Replied On December 20, 2016 02:31 AM

Precision it's just to read the file not to modify it

Thank you for your help

Sridhar Sukumar [Syncfusion]
Replied On December 21, 2016 07:05 AM

Hi Pineau, 
  
Thank you for contacting Syncfusion support. 
  
Documents cannot be opened directly from Asset folder in UWP platform. Please follow the below steps to open documents in UWP platform. 
  
1.     Add the document (Excel document) into Embedded Resource. 
2.     Create stream for the document. 
3.     Open the stream using Workbook.OpenAsync(stream) method. 
  
We have also prepared a sample for this which can be downloaded from the following location 
  
  
Regards, 
Sridhar S. 


CONFIRMATION

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.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;