Is it possible to open Excel file in XAML Windows Store App?

Hi,
I want open excel file from local folder(not from Url) within the windows store app.
Could you please help me how to implement ?
Thanks,
Siva varri
Thread response from msdn

Hi,
If you want to open an excel file by a windows store app. There is no direct API in windows store app can handle excel file. You will need to find a third party component. But
if you want to launch a file into its default handler, please see 
Launcher.LaunchFileAsync API. And you can refer to the link below:
http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh779671.aspx
private async void Button_Click(object sender, RoutedEventArgs e)
StorageFolder storageFolder =
Windows.Storage.ApplicationData.Current.LocalFolder;
StorageFile file =
await storageFolder.GetFileAsync("56.xlsx");
if (file != null)
// Launch the retrieved file
var success = await Windows.System.Launcher.LaunchFileAsync(file);
if (success)
// File launched
else
// File launch failed
else
// Could not find file
Best Wishes!
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

Similar Messages

  • Problem in opening excel file in different window

    hi
    i want to open excel file in different window it open in same window properly on the bases of condition but when i try to open in different with window.open( )
    it give error that file has already used or path not exist OR requisted site either unavailable
    how can i rectified

    Hi.
    I am too facing the same problem. I am using Jakarta Poi to display my resultset in an excel sheet directly(and not into a jsp)
    The browser opens a window showing Open Save Cancel. If i click and save the excel sheet and then open, it opens. But clicking on Open directly doesnt open the excel sheet. Rather it gives the same error
    The file name or path name does not exist.
    The file you are trying to open is being used by another progrtam . close the document in other program and try again
    The name of the work book your tring to save is the same as name of another document that is readonly .try saving workbook with different name
    Can somebody please help me fix this problem, since its an urgent requirement. Mail me at [email protected]
    Thanks
    Hitesh

  • Problem opening excel file in new window

    Hi,
    I have a JSF application that sends an Excel file back to the user.
    My backing bean has a method that uses POI to generate the excel file and then write it to the servlet response.
    This works fine if I call the method from a command button, but this displays the file in the current browser window, whereas I want to open the file in a new window.
    I added an onclick javascript call to a command button which does a window.open() to open a jsp in a new window. The jsp contains an empty view, as I'm using an on-load phase listener to make the call to my backing bean method which should send the excel file when the file opens.
    However, when the window opens, I get an IE error message saying 'Could not open xxx.faces', and then an excel error message saying 'Could not open xxx.xls. This may be because the file does not exist, or the file is already open etc etc'
    However, I found that if the popup window goes through a servlet (which just forwards to the jsp page) instead of going to the jsp directly, it works like a charm.
    Any ideas or suggestions on how to fix this would be very much appreciated. If I can't fix it I'll just stick with the servlet approach, although it just seems a bit messy.
    (I'm using IE6 SP2, tomcat 5.5 btw)
    Cheers,
    Stuart

    I'm doing a similar thing, but I use commandLink to lauch the window. CommandLink has the "target" attribute that I set to _blank.  As you would expect, that opens up the page in the new window.                                                                                                                                                                                                                                                                                                                                                                                                       

  • How come I can't open Excel files from a Windows computer on my Mac?

    My roommate created several Excel spreadsheets on his Windows XP computer and saved them. I put a USB drive in his computer and copied those files to the USB drive and then placed the USB drive in my MacBook. When I go to open the file, it indicates that the files are being used by another user and that it can't open them. What's going on?

    What happens if you copy them to the computer and eject the USB drive?

  • Can't open excel files sent from windows xp pc

    sending excel files from pc via msoffice and when received on imac (mail v2.1) file is a '.dat' file, not a format that excel can open. should be a '.xls' file. file is sent as an attachment to an email from ms outlook on the pc.
    get same result when sending to entourage on the mac.
    msoffice v.X is installed on mac. msoffice 2002 is installed on the pc.
    any ideas on where the problem is would be greatly appreciated.

    I am also using Office for the Mac and I never had such an issue. I have received hundreds of excel files from pc users and same number of files from mac users.
    The problem that you have is somewhere else. You may need to check at :
    http://www.entourage.mvps.org/faq_topic/attachments.html#att7

  • Not able to open excel file in new window any one plese help me as early

    Hi all,
    I have a imag tag in jsp on click on the image i am submitting the form
    1. i have used the below code
    HSSFWorkbook wb=viewHelper.getExcel();
    response.reset();
    ServletOutputStream outs = response.getOutputStream();
         response.setContentType("application/vnd.ms-excel");
         response.addHeader("Pragma", "No-cache");
         response.addHeader("Cache-control", "no-cache");
         response.addDateHeader("Expires",1 );
         wb.write(outs);
         outs.flush();
         outs.close();
         return;
    2. I got one dialog box to open ,save,cancel . if i try to open it is openeing in the same window i had made the request. i need it to ask for in which type of application to open. i.e, in excel , notepad,.....
    please mail me as soon as possible
    [email protected]

    I had a similar porblem....
    I got some help from...http://www.javaworld.com/javaworld/jw-10-2006/jw-1019-xmlexcel.html?page=1...
    This is my code in servlet...
    HSSFWorkbook wb = new HSSFWorkbook();
    HSSFSheet spreadSheet = wb.createSheet("Users");
    spreadSheet.setColumnWidth((short) 0, (short) (256 * 25));
    spreadSheet.setColumnWidth((short) 1, (short) (256 * 25));
    // Creating Rows
    HSSFRow row = spreadSheet.createRow(0);
    HSSFCell cell = row.createCell((short) 1);
    cell.setCellValue("Year 2005");
    cell = row.createCell((short) 2);
    cell.setCellValue("Year 2004");
    HSSFRow row1 = spreadSheet.createRow(1);
    HSSFCellStyle cellStyle = wb.createCellStyle();
    cellStyle.setBorderRight(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderTop(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderLeft(HSSFCellStyle.BORDER_MEDIUM);
    cellStyle.setBorderBottom(HSSFCellStyle.BORDER_MEDIUM);
    cell = row1.createCell((short) 0);
    cell.setCellValue("Revenue ($)");
    cell = row1.createCell((short) 1);
    cell.setCellValue("25656");
    cell = row1.createCell((short) 2);
    cell.setCellValue("15457");
    FileOutputStream output = new FileOutputStream(new File("/tmp/Users.xls"));
    response.setContentType("application/vnd.ms-excel");
    response.setHeader("Content-Disposition", "attachment;filename=Users.xls");
    ServletOutputStream out = response.getOutputStream();
    wb.write(output);
    output.flush();
    output.close();
    forward = null;
    In firefox i get the download dialog box but not able to open in from there,i need to save it and then open. In IE i dont get the dialog box instead the excell open inside the browser......Please help me to open a excel sheet onclick on a link "Export to excel" in jsp......
    Thanks in advance...

  • Possible cause of "Cannot open Excel file error"?

    Hi!
    Here's my problem: one of our LabView applications creates .xls Excel
    files.  However some of these files are too big to be opened into
    Excel, so we need to open these files in DIAdem to analyse the data (in
    fact, even the smaller ones often need to be analysed in DIAdem). 
    The problem is that DIAdem seems totally unable to open Excel files,
    small or big, created by our LabView application or not.  The
    error message appearing when we try to import Excel files is "Cannot
    open Excel file"... which doesn't give any clue about the cause of the
    error.   My question is: what may cause this error to
    occur?  I searched both the help and the website without finding
    useful information.
    The computer is running on WinXP with OfficeXP installed, and we are
    using DIAdem 9.0.  If additionnal information is required, just
    let me know.
    Thanks in advance!
    Maxime B.

    Hi!
    I did some experiments this morning.  First of all, the file I had
    created using Excel that I tried to open yesterday just opened.  I
    don't know why it didn't work yesterday, but, for now, it's
    working.  Now, for my LabView-created files, I still get the same
    error message.  However, if I open the files in Excel and try to
    save, a warning message appears, saying that the file may not be
    compatible with the text (separator:tabulation) format.  If I
    ignore the warning and save the file as a .xls file, I can now import
    it into DIAdem.  The problem is probably that my LabView-created
    files are not "real" .xls files.  Now, this is a problem, because
    I can't open some of the bigger files in Excel without having the data
    truncated (Excel has a maximum of 65536 rows); last year, using DIAdem
    8.X (I don't remember the exact version we had), I could open those
    files without any trouble... Is there any way to get those files to be
    opened with DIAdem 9.0?  I attached one of those files if it may help.
    Thanks!
    Maxime B.
    Attachments:
    Data1.xls ‏152 KB

  • Opening Excel file in HTML

    Hi All,
    Does anyone know how to launch Excel file in HTML or jsp?
    Wait...i know one method to open Excel fiel using
    Window.open(blah...blah..)
    In this case we can specify toolbar option..
    But in my application i am loading excel file in frame.But frame doesnt have any option to set toolbar.....
    Please let me know if you have soln for this....
    Regards,
    Surya

    Hi,
    I can open excel file using window.open...but my requirement is forcing me to open it in frame....And i m able to open it properly in frame...but i want toolbar to come along with that frame...
    according to folowing lin they say it is not possible have scenario like this...
    http://support.microsoft.com/kb/157353/EN-US/
    Please see whether you can help in this regard...

  • How to open Excel FIles

    I am a novice
    When I open excel file  I found some problems.
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Reflection;
    using System.Windows.Forms;
    using XLS=Microsoft.Office.Interop.Excel;
    using WD=Microsoft.Office.Interop.Word;
    using Microsoft.Office.Core;
    namespace ExcelDataFillWord
        public partial class Form1 : Form
            public Form1()
                InitializeComponent();
            private void button1_Click(object sender, EventArgs e)
                //  Scheduler sched = new Scheduler();
                //foreach (Task t in sched.Tasks)
                //    Console.WriteLine(t.ToString());
                //    foreach (Trigger tr in t.Triggers)
                //        Console.WriteLine(tr.ToString());
            private void label1_Click(object sender, EventArgs e)
                FileDialog.Filter = "excel文件|*.xls|Excel文件|*.xlsx";
                FileDialog.Multiselect = false;
                FileDialog.Title = "打开excel文件";
                if (FileDialog.ShowDialog() == DialogResult.OK)
                    textBox1.Text = FileDialog.FileName;
                    object missing = System.Reflection.Missing.Value;
                    //object missing = Type.Missing;
                    CloseProcess();
                   //'Excel::Application excel =new Excel::ApplicationClass();
                    Microsoft.Office.Interop.Excel.Application excel= new Microsoft.Office.Interop.Excel.Application();
                    //Excel::Workbook  Wk =(Excel::Workbook )Xls.Workbooks.Open(textBox1.Text, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing,
    missing, missing, missing, missing);
                    Microsoft.Office.Interop.Excel.Workbook workbook =(Microsoft.Office.Interop.Excel.Workbook) excel.Application.Workbooks.Open(textBox1.Text , missing, missing, missing,
    missing, missing, missing, missing, missing, missing, missing, missing, missing, missing, missing);
                    //comboBox1.Items.Clear();
                    //foreach (Excel::Worksheet Sh in Wk.Worksheets)
                    //    comboBox1.Items.Add((Sh.Name).ToString());
                    workbook.Close(missing, missing, missing);
                    excel.Quit();
            private void CloseProcess()
                System.Diagnostics.Process[] excelProcess = System.Diagnostics.Process.GetProcessesByName("EXCEL");//实例化进程对象
                foreach (System.Diagnostics.Process p in excelProcess)
                    p.Kill();//关闭进程
                System.Threading.Thread.Sleep(10);//使线程休眠10毫秒
    problem is : can't change  excel.applicaitonclass's Com object   to   interface
    so I want to ask a question:
    excel.application is a interface ,then interface variant = a class( it inherients this interface)  object
    but interface is a abstract object ,It has no construct function . why We use  Excel.Applcation xsl=new Excel.Application();

    Hello,
    Perhaps this will help. Open an Excel file, select a sheet, range then set a value, save then close. The idea here is not to write or save but demo a few basic operations.
    Also note 'as is' all memory is cleaned up without resorting to what many do, force the garbage collector. This is important if objects are not cleaned up it is very possible in extreme cases to bring a machine down so one should ensure all objects are cleaned
    up which only comes from well written code be it C# or VB.NET
    using System;
    using System.Data;
    using System.Data.OleDb;
    using System.Runtime.InteropServices;
    using System.Windows.Forms;
    using Excel = Microsoft.Office.Interop.Excel;
    namespace Example_C1
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    public void OpenExcelExample(string FileName, string SheetName)
    if (System.IO.File.Exists(FileName))
    bool Proceed = false;
    Excel.Application xlApp = null;
    Excel.Workbooks xlWorkBooks = null;
    Excel.Workbook xlWorkBook = null;
    Excel.Worksheet xlWorkSheet = null;
    Excel.Sheets xlWorkSheets = null;
    Excel.Range xlCells = null;
    xlApp = new Excel.Application();
    xlApp.DisplayAlerts = false;
    xlWorkBooks = xlApp.Workbooks;
    xlWorkBook = xlWorkBooks.Open(FileName);
    xlApp.Visible = false;
    xlWorkSheets = xlWorkBook.Sheets;
    for (int x = 1; x <= xlWorkSheets.Count; x++)
    xlWorkSheet = (Excel.Worksheet)xlWorkSheets.get_Item(x);
    if (xlWorkSheet.Name == SheetName)
    Proceed = true;
    break;
    System.Runtime.InteropServices.Marshal.FinalReleaseComObject(xlWorkSheet);
    xlWorkSheet = null;
    if (Proceed)
    Excel.Range xlRange1 = null;
    xlRange1 = xlWorkSheet.get_Range("A1");
    xlRange1.Value = "Hello";
    Marshal.FinalReleaseComObject(xlRange1);
    xlRange1 = null;
    xlWorkSheet.SaveAs(FileName);
    else
    MessageBox.Show(SheetName + " not found.");
    xlWorkBook.Close();
    xlApp.UserControl = true;
    xlApp.Quit();
    ReleaseComObject(xlCells);
    ReleaseComObject(xlWorkSheets);
    ReleaseComObject(xlWorkSheet);
    ReleaseComObject(xlWorkBook);
    ReleaseComObject(xlWorkBooks);
    ReleaseComObject(xlApp);
    MessageBox.Show("Done");
    else
    MessageBox.Show("'" + FileName + "' not located. Try one of the write examples first.");
    private void ReleaseComObject(object obj)
    try
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
    obj = null;
    catch (Exception)
    obj = null;
    private void button1_Click(object sender, EventArgs e)
    OpenExcelExample(System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "WS1.xlsx"), "Sheet3");
    private void releaseObject(object obj)
    try
    if (obj == null)
    System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
    obj = null;
    catch (Exception ex)
    obj = null;
    MessageBox.Show("Exception Occured while releasing object " + ex.ToString());
    finally
    GC.Collect();
    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

  • Is there a way to open Excell file from the server and display in the UI and save it back on to the

    Hello there,
    Is there a way to open Excell file from the server and display in the UI and save it back on to the server? (like showing xell file as a datagrid - add rows, columns etc.)

    Hi Mike,
    Welcome you to the forum.
    You may try:
    SELECT * FROM MyDBNameHere.dbo.OUSR T0
    Thanks,
    Gordon

  • Excel 2008 wont open excel files from at WHS network share.

    hi all
    i have a strange problem here, i own a mac mini the 2.53ghz model bought a month ago, and a macbook (the white model) also bought a month ago, both running all the latest software updates, and office 2008 for mac, with all the latest updates
    on the mac mini, i can´t open any excel documents that are stored on a shared folder on my windows home server, it just says
    excel cannot open this file the file might have been damaged or modified from its original format
    but when i try to open the same document on the macbook, it opens just fine?
    i have tried to remove office 2008 and reinstall it on the mac mini, but that didnt help, and the strange thing is if i move the excel files, from my windows home server, to another windows home server, it opens just fine on the mac mini
    i then suspected that it was the WHS that was ****** up, and deleted the account on the WHS where the folders were stored, rebooted the whs, and added the account again, but with the same result, the mac mini wont open the excel files, it will open word files, from the same folder.
    and the macbook will still open both excel and word files, from the same folder?
    i´m really confused now, and cant seem to pinpoint the error, and hope that someone can give me some pointers of where to look?
    sincerely
    Carsten Larsen
    Denmark

    You're pobably better off posting your question on Microsoft's own forums for their Mac products, as it's their software you're having issue with:
    http://www.officeformac.com/productforums

  • How to list all currently open Excel files with ActiveX?

    Hello all!
    I would like to program with ActiveX a way to retrieve a list (array of strings) of the filenames of the currently opened Excel files in windows. However, I am fairly new to the ActiveX/Excel business in LV and after hours looking at the "millions" of objects in the property nodes I give up and hope some kind soul here can help me. I couldn't find any information in this forum regarding the same issue, although some were close
    I am using LV 7.1 without the Report Generation Toolkit.
    Thanks!
    /Goran

    Hi KC,
    thanks for your reply. I have in fact been able to find the desired things in the ActiveX properties/methods for Excel in LabView. It took me some looong work going through the functions which I suspected to be the ones. Anyway, I post a little jpeg here of the code if someone ever needs the same functionality. What it does is that it checks how many Excel workbooks are open and controls if each of them matches the searched Excel filename, if one does, it is closed.
    Enjoy
    /Goran
    Attachments:
    List open excel sheets and close open ones.jpg ‏104 KB

  • Some users can't open Excel files. It is trying to open it in Internet Explorer "An error has occurred. Please try again."

    I have some users in my company that can't open Excel files from any document libraries on SharePoint 2010. The receive the error message "An error occurred. Please try again."  We don't currently use the Excel calculations services. When
    a user opens an excel file they are prompted to either Read Only or Edit.
    This affects less than 5 people in a large company.  They have the Full Control permissions and have been able to open the files previously.  There has been no changes made to the server either.  I can't find anything that points to this in the
    event viewer. 
    It doesn't matter if which computer that they try to open this up from either.   All computers are Windows 7 Professional with IE 9 and Office 2010 x64.   
    I can't find anything that points specifically to this exact error. None of the excel files contain pivot tables.    This one has me stumped.

    I would make sure no one has open on machine / locked on machine (Would assume you checked this, but wanted to add)
    Also would have assumed you restarted the machines (:))
    Make sure the file security did not change (check to ensure no one changed the sercuity of the excel)
    Make sure the version of excel is the same (Changing from 2010 back to 2007 affects the file, etc.. on convert) that no one converted and saved thus causing error in file.
    Can they open other excel files?
    It sounds like the excel file it self has changed if you cannot see issue in SharePoint logs.
    If it is all SharePoint excel files - try deleting one persons access and readding them to see if that helps.
    SharePoint has issues ;)

  • Is there a possibility to open raw files from the Nikon D750 in photoshop elements 11?

    Is there a possibility to open raw files from the Nikon D750 in photoshop elements 11? I allready tried to install camera raw 8.7.1 but it doesn't work.

    Yes, I see:
    Letzte Aktualisierung
    16.04.2012
    The link I gave is listed in the faqs of this forum.
    Photoshop Elements FAQ List
    mfG
    Michel

  • Opening Excel Files from DB (blob column)

    My project has implemented a WEBUTIL solution to attach files into the database, view the files stored in the database (in a BLOB column), and remove the files stored in the database.
    Everything has been running smoothly. We are in final testing and have found a couple of interesting scenarios ...
    When a user tries to view an Microsoft Excel 2007 file from our application, the Excel file displays properly (as long as Microsoft Excel isn't already open - outside of our Oracle application). Once the Excel file is viewed, the system will not allow the user back to our application until after the Excel file is closed (we use the start /wait myExcelFile.xls ... command). This works perfectly for us.
    The two scenarios we encounter occur when
    1.) The user has Microsoft Excel open outside of our application and tries to open an Excel file from within our application, or
    2.) The user has the file already open (either from within our application or outside of our application) and then tries to open the file from within our application.
    Let me explain a little further because the above two scenarios are interrelated.
    When a user has Microsoft Excel open (outside of our application), and then clicks the button to open the Excel file, the system will open the file as another window (within Excel). The system will allow the user to navigate back to our application (where as, if Excel is not open outside of our application, the system will not allow the user to navigate back to our application). Once the user navigates back to our application (while the file is still open), the user can click the button to view the file again. At this point, the user is displayed a WUT-105 error message (I assume b/c the system is trying to open a file that is already open).
    I assume the two solutions are the following:
    a.) Do not allow a user to open a file that is already open (not sure how to check this from within Forms ?)
    b.) Do not allow a user to open an Excel file when another EXCEL process is already running (this will avoid allowing the user to naviagate back to our application)
    I don't know if there is a better solution.
    Do you experts have any recommendations?
    We are using Oracle Application Server 10g R2 (10.1.2.0.2), Oracle Database 10g R2 (10.2), and Oracle Developer 10g (10.1.2.0.2)
    I hope this all makes sense.
    Thanks,
    Mike
    Edited by: user639843 on Oct 20, 2008 2:15 PM
    Edited by: user639843 on Oct 20, 2008 2:20 PM

    Thank you, Thank you, Thank you!!!!
    I believe that will work (adding a sequence number to the end of the filename)!
    We do not allow a user to update the file, only view. If a user wants to make a change, they need to remove the existing file (from the database), create a new file (outside of our application), and attach the file in our application (into the database). All updates occur outside of our application - we are not a document authoring system, just a document storage system.
    Once again, many thanks on the solution!
    Mike

Maybe you are looking for

  • How can I move an original Version from one Project to another Project?

    How can I move an original Version from one Project to another Project?

  • Duplex printing

    Post Author: xcosyx CA Forum: Crystal Reports    Hello I have a problem with duplex printing. Please help.   I have a table with dates of peopleI try to make a report with tickets for this customersI have a detail band with this tickets ( 3 on 1 page

  • Alpha channel video makes for a larger-than-target bitrate flv

    I'm looking for some information regarding the final bitrate of alpha channel encoded video. We are producing transparent flvs. When targeting a number, say 200kbps, in Adobe Media Encoder, the final encoded flvs has a bitrate of sometimes as high as

  • Buying Lion from Windows

    Hey guys. I'm currently in Lion Recovery Mode and I have to reinstall the Lion OS. However, I need to get one from the mac app store but my i can't boot up into my account. Can someone tell me how do I buy Lion from Windows?

  • NW2004s SR1 install; jcontrol errors license issue

    I have installed NW2004s SR with Portal scenario. I cannot get the engine to stabilize. I checked jcontrol logs and found this: Thr  1] JStartupICreateProcess: fork process (pid 598156) [Thr  1] JControlICheckProcessList: process SDM started (PID:598