我们如何可以创建,写入和读取的Windows Phone 8的Excel文件 [英] How can we create, write and read an excel file for Windows Phone 8

查看:132
本文介绍了我们如何可以创建,写入和读取的Windows Phone 8的Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已创建的文件,写上一些数据。当我在Windows资源管理器找文件的创建它不存在。在另一边我不能与我坐上模拟器文件的路径有关。这是链接正在使用。请帮助。

I have created the file and written some data on it. When I look for created file in windows explorer it is not present. On the other side am not able to relate with the path of the file which I get on emulator. This is the link am using. Kindly help.

HTTP:// WWW .codeproject.com /用品/ 33850 /生成-Excel的文件,且不使用,微软的Excel FID = 1536838&放大器; DF = 90安培; MPP = 10安培,噪音= 1&安培;教授=真放;排序=位置和放大器;查看=扩展&放; SPC =无&安培; FR = 11#xx0xx

推荐答案

WP8支持只读模式与开放办公您的文件。为了做到这一点,你需要激活Excel的app2app文件扩展名。 Excel的应用程序办公室注册到XLS和XLSX文件扩展名。

WP8 supports opening up office in read-only mode with your files. In order to do that you'll need to activate Excel's app2app file extension. The excel office app is registered to the XLS and XLSX file extensions.

要发送Office文件,你首先需要编写完整的文件到独立存储。一旦该文件是IsolatedStorage使用发送到办公室 Launcher.LaunchFileAsync()

To send Office files you'll first need write the complete file into Isolated Storage. Once the file is in IsolatedStorage send it over to office by using Launcher.LaunchFileAsync().

    private async void LaunchExcel(object sender, RoutedEventArgs e)
    {
        var file = await ApplicationData.Current.LocalFolder.CreateFileAsync("myExcelFile.xlsx");
        using (var s = await file.OpenAsync(FileAccessMode.ReadWrite))
        using (var dw = new DataWriter(s))
        {
            dw.WriteString("hello world");
        }

        await Launcher.LaunchFileAsync(
            await ApplicationData.Current.LocalFolder.GetFileAsync("myExcelFile.xlsx"));
    }



我不知道,如果XLS格式链接到您的文章实际上是由办公室WP8支持。如果它不考虑使用ClosedXML OSS项目生成XLSX的Office Open XML @ http://closedxml.codeplex.com/

这篇关于我们如何可以创建,写入和读取的Windows Phone 8的Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆